|
@@ -1,2 +1,37 @@
|
|
1
|
+import org.junit.Assert;
|
|
2
|
+import org.junit.Test;
|
|
3
|
+
|
|
4
|
+import java.util.OptionalDouble;
|
|
5
|
+
|
1
|
6
|
public class FizzBuzzTest {
|
|
7
|
+ FizzBuzz tdd = new FizzBuzz();
|
|
8
|
+
|
|
9
|
+ @Test
|
|
10
|
+ public void fizzBuzzTest(){
|
|
11
|
+ String expected = "Fizz";
|
|
12
|
+
|
|
13
|
+ String actual = tdd.fizzBuzz(9);
|
|
14
|
+
|
|
15
|
+ Assert.assertEquals("Should return 'fizz'", expected,actual);
|
|
16
|
+ }
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+ @Test
|
|
20
|
+ public void fizzBuzzTest2(){
|
|
21
|
+ String expected = "Buzz";
|
|
22
|
+
|
|
23
|
+ String actual = tdd.fizzBuzz(10);
|
|
24
|
+
|
|
25
|
+ Assert.assertEquals("Should return 'Buzz'", expected,actual);
|
|
26
|
+ }
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+ @Test
|
|
30
|
+ public void fizzBuzzTest3(){
|
|
31
|
+ String expected = "FizzBuzz";
|
|
32
|
+
|
|
33
|
+ String actual = tdd.fizzBuzz(15);
|
|
34
|
+ Assert.assertEquals("Should return 'FizzBuzz'", expected,actual);
|
|
35
|
+ }
|
|
36
|
+
|
2
|
37
|
}
|