|
@@ -1,2 +1,41 @@
|
|
1
|
+import org.junit.*;
|
|
2
|
+
|
1
|
3
|
public class FizzBuzzTest {
|
|
4
|
+ @Test
|
|
5
|
+ public void checkThreeTest(){
|
|
6
|
+ //Given
|
|
7
|
+ int input = 3;
|
|
8
|
+ String expected = "Fizz";
|
|
9
|
+ //When
|
|
10
|
+ String actual = FizzBuzz.FizzBuzz(input);
|
|
11
|
+ Assert.assertEquals(expected,actual);
|
|
12
|
+ }
|
|
13
|
+ @Test
|
|
14
|
+ public void checkFiveTest(){
|
|
15
|
+ //Given
|
|
16
|
+ int input = 5;
|
|
17
|
+ String expected = "Buzz";
|
|
18
|
+ //When
|
|
19
|
+ String actual = FizzBuzz.FizzBuzz(input);
|
|
20
|
+ Assert.assertEquals(expected,actual);
|
|
21
|
+ }
|
|
22
|
+ @Test
|
|
23
|
+ public void checkFifteenTest(){
|
|
24
|
+ //Given
|
|
25
|
+ int input = 15;
|
|
26
|
+ String expected = "FizzBuzz";
|
|
27
|
+ //When
|
|
28
|
+ String actual = FizzBuzz.FizzBuzz(input);
|
|
29
|
+ Assert.assertEquals(expected,actual);
|
|
30
|
+ }
|
|
31
|
+ @Test
|
|
32
|
+ public void checkElseTest(){
|
|
33
|
+ //Given
|
|
34
|
+ int input = 8;
|
|
35
|
+ String expected = "8";
|
|
36
|
+ //When
|
|
37
|
+ String actual = FizzBuzz.FizzBuzz(input);
|
|
38
|
+ Assert.assertEquals(expected,actual);
|
|
39
|
+ }
|
|
40
|
+
|
2
|
41
|
}
|