Skip to content

Commit 04f125f

Browse files
committed
Init fizz buzz exercise
1 parent 2651643 commit 04f125f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package edu.thoughtworks.training;
2+
3+
public class FizzBuzz {
4+
public String represent(int number) {
5+
return null;
6+
}
7+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package edu.thoughtworks.training;
2+
3+
import org.junit.Test;
4+
5+
import static org.hamcrest.CoreMatchers.is;
6+
import static org.hamcrest.MatcherAssert.assertThat;
7+
8+
public class FizzBuzzShould {
9+
@Test
10+
public void returnFizzWhenNumberIsDivisibleBy3() {
11+
FizzBuzz fizzBuzz = new FizzBuzz();
12+
assertThat("FizzBuzz doesn't return Fizz on multiples of 3",
13+
fizzBuzz.represent(3), is("Fizz"));
14+
}
15+
}

0 commit comments

Comments
 (0)