|
@@ -0,0 +1,47 @@
|
|
1
|
+import static org.junit.Assert.*;
|
|
2
|
+import org.junit.After;
|
|
3
|
+import org.junit.Before;
|
|
4
|
+import org.junit.Test;
|
|
5
|
+
|
|
6
|
+public class FizzBuzzTest
|
|
7
|
+{
|
|
8
|
+ @Test
|
|
9
|
+ public void FizzBuzzTest1(){
|
|
10
|
+ FizzBuzz fb = new FizzBuzz();
|
|
11
|
+
|
|
12
|
+ String expected = "1";
|
|
13
|
+ String actual = fb.fizzBuzz(1);
|
|
14
|
+
|
|
15
|
+ assertEquals(expected, actual);
|
|
16
|
+ }
|
|
17
|
+
|
|
18
|
+ @Test
|
|
19
|
+ public void FizzBuzzTest3(){
|
|
20
|
+ FizzBuzz fb = new FizzBuzz();
|
|
21
|
+
|
|
22
|
+ String expected = "fizz";
|
|
23
|
+ String actual = fb.fizzBuzz(3);
|
|
24
|
+
|
|
25
|
+ assertEquals(expected, actual);
|
|
26
|
+ }
|
|
27
|
+
|
|
28
|
+ @Test
|
|
29
|
+ public void FizzBuzzTest5(){
|
|
30
|
+ FizzBuzz fb = new FizzBuzz();
|
|
31
|
+
|
|
32
|
+ String expected = "buzz";
|
|
33
|
+ String actual = fb.fizzBuzz(5);
|
|
34
|
+
|
|
35
|
+ assertEquals(expected, actual);
|
|
36
|
+ }
|
|
37
|
+
|
|
38
|
+ @Test
|
|
39
|
+ public void FizzBuzzTest15(){
|
|
40
|
+ FizzBuzz fb = new FizzBuzz();
|
|
41
|
+
|
|
42
|
+ String expected = "fizzbuzz";
|
|
43
|
+ String actual = fb.fizzBuzz(15);
|
|
44
|
+
|
|
45
|
+ assertEquals(expected, actual);
|
|
46
|
+ }
|
|
47
|
+}
|