|
@@ -1,2 +1,69 @@
|
|
1
|
+import org.junit.Assert;
|
|
2
|
+import org.junit.Test;
|
|
3
|
+
|
1
|
4
|
public class FizzBuzzTest {
|
2
|
|
-}
|
|
5
|
+
|
|
6
|
+ @Test
|
|
7
|
+ public void fizzTest() {
|
|
8
|
+ FizzBuzz fb = new FizzBuzz();
|
|
9
|
+ String expectedValue = "Fizz";
|
|
10
|
+ String actualValue = fb.of(3);
|
|
11
|
+
|
|
12
|
+ Assert.assertEquals(expectedValue,actualValue);
|
|
13
|
+ }
|
|
14
|
+
|
|
15
|
+ @Test
|
|
16
|
+ public void buzzTest() {
|
|
17
|
+ FizzBuzz fb = new FizzBuzz();
|
|
18
|
+ String expectedValue = "Buzz";
|
|
19
|
+ String actualValue = fb.of(5);
|
|
20
|
+
|
|
21
|
+ Assert.assertEquals(expectedValue,actualValue);
|
|
22
|
+ }
|
|
23
|
+
|
|
24
|
+ @Test
|
|
25
|
+ public void fizzBuzzTest() {
|
|
26
|
+ FizzBuzz fb = new FizzBuzz();
|
|
27
|
+ String expectedValue = "FizzBuzz";
|
|
28
|
+ String actualValue = fb.of(15);
|
|
29
|
+
|
|
30
|
+ Assert.assertEquals(expectedValue,actualValue);
|
|
31
|
+ }
|
|
32
|
+
|
|
33
|
+ @Test
|
|
34
|
+ public void fizzTest1() {
|
|
35
|
+ FizzBuzz fb = new FizzBuzz();
|
|
36
|
+ String expectedValue = "Fizz";
|
|
37
|
+ String actualValue = fb.of(99);
|
|
38
|
+
|
|
39
|
+ Assert.assertEquals(expectedValue,actualValue);
|
|
40
|
+ }
|
|
41
|
+
|
|
42
|
+ @Test
|
|
43
|
+ public void buzzTest1() {
|
|
44
|
+ FizzBuzz fb = new FizzBuzz();
|
|
45
|
+ String expectedValue = "Buzz";
|
|
46
|
+ String actualValue = fb.of(100);
|
|
47
|
+
|
|
48
|
+ Assert.assertEquals(expectedValue,actualValue);
|
|
49
|
+ }
|
|
50
|
+
|
|
51
|
+ @Test
|
|
52
|
+ public void fizzBuzzTest1() {
|
|
53
|
+ FizzBuzz fb = new FizzBuzz();
|
|
54
|
+ String expectedValue = "FizzBuzz";
|
|
55
|
+ String actualValue = fb.of(90);
|
|
56
|
+
|
|
57
|
+ Assert.assertEquals(expectedValue,actualValue);
|
|
58
|
+ }
|
|
59
|
+
|
|
60
|
+ @Test
|
|
61
|
+ public void failTest() {
|
|
62
|
+ FizzBuzz fb = new FizzBuzz();
|
|
63
|
+ String expectedValue = "98";
|
|
64
|
+ String actualValue = fb.of(98);
|
|
65
|
+
|
|
66
|
+ Assert.assertEquals(expectedValue,actualValue);
|
|
67
|
+ }
|
|
68
|
+
|
|
69
|
+}
|