|
@@ -1,2 +1,64 @@
|
|
1
|
+import org.junit.Assert;
|
|
2
|
+import org.junit.Test;
|
|
3
|
+
|
1
|
4
|
public class FizzBuzzTest {
|
|
5
|
+
|
|
6
|
+@Test
|
|
7
|
+public void testFifteen() {
|
|
8
|
+
|
|
9
|
+ //Given
|
|
10
|
+
|
|
11
|
+ FizzBuzz liftUp = new FizzBuzz();
|
|
12
|
+ String differentWord = "FizzBuzz";
|
|
13
|
+
|
|
14
|
+ //When
|
|
15
|
+ String awesome = liftUp.of(15);
|
|
16
|
+ Assert.assertEquals(differentWord, awesome);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
2
|
20
|
}
|
|
21
|
+@Test
|
|
22
|
+ public void testFive() {
|
|
23
|
+
|
|
24
|
+ //Given
|
|
25
|
+
|
|
26
|
+ FizzBuzz FitBit = new FizzBuzz();
|
|
27
|
+ String newWord = "Buzz";
|
|
28
|
+
|
|
29
|
+ //When
|
|
30
|
+ String hamburger = FitBit.of(5);
|
|
31
|
+ Assert.assertEquals(newWord, hamburger);
|
|
32
|
+
|
|
33
|
+ }
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+@Test
|
|
37
|
+public void testThree() {
|
|
38
|
+
|
|
39
|
+ //Given
|
|
40
|
+ FizzBuzz Fizzbuzz = new FizzBuzz();
|
|
41
|
+ String expWord = "Fizz";
|
|
42
|
+
|
|
43
|
+ //When
|
|
44
|
+ String actWord = Fizzbuzz.of(3);
|
|
45
|
+
|
|
46
|
+ Assert.assertEquals(expWord, actWord );
|
|
47
|
+
|
|
48
|
+ }
|
|
49
|
+ @Test
|
|
50
|
+ public void numberAsString() {
|
|
51
|
+
|
|
52
|
+ //Given
|
|
53
|
+
|
|
54
|
+ FizzBuzz nooo = new FizzBuzz();
|
|
55
|
+ String differentWord = "4";
|
|
56
|
+
|
|
57
|
+ //When
|
|
58
|
+ String hello = nooo.of(4);
|
|
59
|
+ Assert.assertEquals(differentWord, hello);
|
|
60
|
+
|
|
61
|
+ }
|
|
62
|
+
|
|
63
|
+}
|
|
64
|
+
|