|
6 | 6 |
|
7 | 7 | import static org.junit.Assert.assertEquals;
|
8 | 8 |
|
9 |
| -/** |
10 |
| - * Created by stevesun on 6/6/17. |
11 |
| - */ |
12 | 9 | public class _319Test {
|
13 |
| - private static _319 test; |
14 |
| - |
15 |
| - @BeforeClass |
16 |
| - public static void setup() { |
17 |
| - test = new _319(); |
18 |
| - } |
19 |
| - |
20 |
| - @Test |
21 |
| - public void test1() { |
22 |
| - assertEquals(1, test.bulbSwitch(2)); |
23 |
| - } |
24 |
| - |
25 |
| - @Test |
26 |
| - public void test2() { |
27 |
| - assertEquals(1, test.bulbSwitch(3)); |
28 |
| - } |
29 |
| - |
30 |
| - @Test |
31 |
| - public void test3() { |
32 |
| - assertEquals(2, test.bulbSwitch(4)); |
33 |
| - } |
34 |
| - |
35 |
| - @Test |
36 |
| - public void test4() { |
37 |
| - assertEquals(2, test.bulbSwitch(5)); |
38 |
| - } |
39 |
| - |
40 |
| - @Test |
41 |
| - public void test5() { |
42 |
| - assertEquals(2, test.bulbSwitch(6)); |
43 |
| - } |
44 |
| - |
45 |
| - @Test |
46 |
| - public void test6() { |
47 |
| - assertEquals(2, test.bulbSwitch(7)); |
48 |
| - } |
49 |
| - |
50 |
| - @Test |
51 |
| - public void test7() { |
52 |
| - assertEquals(2, test.bulbSwitch(8)); |
53 |
| - } |
54 |
| - |
55 |
| - @Test |
56 |
| - public void test8() { |
57 |
| - assertEquals(3, test.bulbSwitch(9)); |
58 |
| - } |
59 |
| - |
60 |
| - @Test |
61 |
| - public void test11() { |
62 |
| - assertEquals(3, test.bulbSwitch(15)); |
63 |
| - } |
64 |
| - |
65 |
| - @Test |
66 |
| - public void test9() { |
67 |
| - assertEquals(4, test.bulbSwitch(17)); |
68 |
| - } |
69 |
| - |
70 |
| - @Test |
71 |
| - public void test10() { |
72 |
| - assertEquals(4, test.bulbSwitch(16)); |
73 |
| - } |
74 |
| - |
75 |
| - |
| 10 | + private static _319.Solution1 solution1; |
| 11 | + |
| 12 | + @BeforeClass |
| 13 | + public static void setup() { |
| 14 | + solution1 = new _319.Solution1(); |
| 15 | + } |
| 16 | + |
| 17 | + @Test |
| 18 | + public void test1() { |
| 19 | + assertEquals(1, solution1.bulbSwitch(2)); |
| 20 | + } |
| 21 | + |
| 22 | + @Test |
| 23 | + public void test2() { |
| 24 | + assertEquals(1, solution1.bulbSwitch(3)); |
| 25 | + } |
| 26 | + |
| 27 | + @Test |
| 28 | + public void test3() { |
| 29 | + assertEquals(2, solution1.bulbSwitch(4)); |
| 30 | + } |
| 31 | + |
| 32 | + @Test |
| 33 | + public void test4() { |
| 34 | + assertEquals(2, solution1.bulbSwitch(5)); |
| 35 | + } |
| 36 | + |
| 37 | + @Test |
| 38 | + public void test5() { |
| 39 | + assertEquals(2, solution1.bulbSwitch(6)); |
| 40 | + } |
| 41 | + |
| 42 | + @Test |
| 43 | + public void test6() { |
| 44 | + assertEquals(2, solution1.bulbSwitch(7)); |
| 45 | + } |
| 46 | + |
| 47 | + @Test |
| 48 | + public void test7() { |
| 49 | + assertEquals(2, solution1.bulbSwitch(8)); |
| 50 | + } |
| 51 | + |
| 52 | + @Test |
| 53 | + public void test8() { |
| 54 | + assertEquals(3, solution1.bulbSwitch(9)); |
| 55 | + } |
| 56 | + |
| 57 | + @Test |
| 58 | + public void test11() { |
| 59 | + assertEquals(3, solution1.bulbSwitch(15)); |
| 60 | + } |
| 61 | + |
| 62 | + @Test |
| 63 | + public void test9() { |
| 64 | + assertEquals(4, solution1.bulbSwitch(17)); |
| 65 | + } |
| 66 | + |
| 67 | + @Test |
| 68 | + public void test10() { |
| 69 | + assertEquals(4, solution1.bulbSwitch(16)); |
| 70 | + } |
76 | 71 | }
|
0 commit comments