|
@@ -0,0 +1,47 @@
|
|
1
|
+
|
|
2
|
+import static org.junit.Assert.*;
|
|
3
|
+import org.junit.After;
|
|
4
|
+import org.junit.Before;
|
|
5
|
+import org.junit.Test;
|
|
6
|
+import org.junit.Assert;
|
|
7
|
+
|
|
8
|
+/**
|
|
9
|
+ * The test class FizzBuzzTest.
|
|
10
|
+ *
|
|
11
|
+ * @Mexi Liang
|
|
12
|
+ * @06/03/2018
|
|
13
|
+ */
|
|
14
|
+public class FizzBuzzTest
|
|
15
|
+
|
|
16
|
+{
|
|
17
|
+ @Test
|
|
18
|
+ public void test3 () {
|
|
19
|
+ FizzBuzz fizz = new FizzBuzz();
|
|
20
|
+ String expected = "Fizz";
|
|
21
|
+ String actual = fizz.run(3);
|
|
22
|
+ Assert.assertEquals(expected,actual);
|
|
23
|
+
|
|
24
|
+ }
|
|
25
|
+
|
|
26
|
+ @Test
|
|
27
|
+ public void test5 (){
|
|
28
|
+ FizzBuzz buzz = new FizzBuzz();
|
|
29
|
+ String expected = "Buzz";
|
|
30
|
+ String actual = buzz.divide(5);
|
|
31
|
+ Assert.assertEquals(expected, actual);
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ @Test
|
|
35
|
+ public void test15(){
|
|
36
|
+ FizzBuzz fb = new FizzBuzz();
|
|
37
|
+ String expected = "FizzBuzz";
|
|
38
|
+ String actual = fb.blabla(15);
|
|
39
|
+ Assert.assertEquals(expected, actual);
|
|
40
|
+ }
|
|
41
|
+
|
|
42
|
+ @Test
|
|
43
|
+ public void test4(){
|
|
44
|
+ FizzBuzz hia = new FizzBuzz();
|
|
45
|
+
|
|
46
|
+ }
|
|
47
|
+}
|