|
@@ -1,2 +1,61 @@
|
|
1
|
+import org.junit.Assert;
|
|
2
|
+import org.junit.Test;
|
|
3
|
+
|
1
|
4
|
public class FizzBuzzTest {
|
|
5
|
+
|
|
6
|
+ @Test
|
|
7
|
+ public void divThree() {
|
|
8
|
+ FizzBuzz fizz = new FizzBuzz();
|
|
9
|
+ int num = 9;
|
|
10
|
+ String Expected = "Fizz";
|
|
11
|
+
|
|
12
|
+ String actual = FizzBuzz.divThree(num);
|
|
13
|
+ Assert.assertEquals(Expected,actual);
|
|
14
|
+ }
|
|
15
|
+ @Test
|
|
16
|
+ public void divThree2() {
|
|
17
|
+ FizzBuzz fizz = new FizzBuzz();
|
|
18
|
+ int num = 2;
|
|
19
|
+ String Expected = "2";
|
|
20
|
+
|
|
21
|
+ String actual = FizzBuzz.divThree(num);
|
|
22
|
+ Assert.assertEquals(Expected,actual);
|
|
23
|
+ }
|
|
24
|
+ @Test
|
|
25
|
+ public void divFive() {
|
|
26
|
+ FizzBuzz buzz = new FizzBuzz();
|
|
27
|
+ int num = 10;
|
|
28
|
+ String Expected = "Buzz";
|
|
29
|
+
|
|
30
|
+ String actual = FizzBuzz.divFive(num);
|
|
31
|
+ Assert.assertEquals(Expected,actual);
|
|
32
|
+ }
|
|
33
|
+ @Test
|
|
34
|
+ public void divFive2() {
|
|
35
|
+ FizzBuzz buzz = new FizzBuzz();
|
|
36
|
+ int num = 3;
|
|
37
|
+ String Expected = "3";
|
|
38
|
+
|
|
39
|
+ String actual = FizzBuzz.divFive(num);
|
|
40
|
+ Assert.assertEquals(Expected,actual);
|
|
41
|
+ }
|
|
42
|
+ @Test
|
|
43
|
+ public void divThreeFive() {
|
|
44
|
+ FizzBuzz fizzBuzz = new FizzBuzz();
|
|
45
|
+ int num = 30;
|
|
46
|
+ String Expected = "FizzBuzz";
|
|
47
|
+
|
|
48
|
+ String actual = FizzBuzz.divThreeFive(num);
|
|
49
|
+ Assert.assertEquals(Expected,actual);
|
|
50
|
+ }
|
|
51
|
+ @Test
|
|
52
|
+ public void divThreeFive2() {
|
|
53
|
+ FizzBuzz fizzBuzz = new FizzBuzz();
|
|
54
|
+ int num = 2;
|
|
55
|
+ String Expected = "2";
|
|
56
|
+
|
|
57
|
+ String actual = FizzBuzz.divThreeFive(num);
|
|
58
|
+ Assert.assertEquals(Expected,actual);
|
|
59
|
+ }
|
|
60
|
+
|
2
|
61
|
}
|