|
@@ -1,2 +1,53 @@
|
|
1
|
+import org.junit.Assert;
|
|
2
|
+import org.junit.Test;
|
|
3
|
+
|
|
4
|
+
|
1
|
5
|
public class FizzBuzzTest {
|
2
|
|
-}
|
|
6
|
+ @Test
|
|
7
|
+ public void fizzTest(){
|
|
8
|
+ //FizzBuzz fb = new FizzBuzz();
|
|
9
|
+ int number = 3;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+ String expected = "Fizz";
|
|
13
|
+
|
|
14
|
+ String actual = FizzBuzz.of(number);
|
|
15
|
+ Assert.assertEquals(expected,actual);
|
|
16
|
+ }
|
|
17
|
+
|
|
18
|
+ @Test
|
|
19
|
+ public void buzzTest() {
|
|
20
|
+ //FizzBuzz fb = new FizzBuzz();
|
|
21
|
+ int number = 5;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+ String expected = "Buzz";
|
|
25
|
+
|
|
26
|
+ String actual = FizzBuzz.of(number);
|
|
27
|
+ Assert.assertEquals(expected,actual);
|
|
28
|
+ }
|
|
29
|
+
|
|
30
|
+ @Test
|
|
31
|
+ public void fizzBuzzTest() {
|
|
32
|
+ //FizzBuzz fb = new FizzBuzz();
|
|
33
|
+ int number = 15;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+ String expected = "FizzBuzz";
|
|
37
|
+
|
|
38
|
+ String actual = FizzBuzz.of(number);
|
|
39
|
+ Assert.assertEquals(expected,actual);
|
|
40
|
+ }
|
|
41
|
+
|
|
42
|
+ @Test
|
|
43
|
+ public void numberTest() {
|
|
44
|
+ //FizzBuzz fb = new FizzBuzz();
|
|
45
|
+ int number = 2;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+ String expected = Integer.toString(number);
|
|
49
|
+
|
|
50
|
+ String actual = FizzBuzz.of(number);
|
|
51
|
+ Assert.assertEquals(expected,actual);
|
|
52
|
+ }
|
|
53
|
+}
|