File tree 2 files changed +25
-32
lines changed
src/test/java/com/fishercoder
2 files changed +25
-32
lines changed Original file line number Diff line number Diff line change 1
1
package com .fishercoder ;
2
2
3
3
import com .fishercoder .solutions ._51 ;
4
- import org .junit .Test ;
5
4
import org .junit .jupiter .api .BeforeEach ;
5
+ import org .junit .jupiter .api .Test ;
6
6
7
7
import java .util .ArrayList ;
8
8
import java .util .Arrays ;
Original file line number Diff line number Diff line change 1
1
package com .fishercoder ;
2
2
3
3
import com .fishercoder .solutions ._52 ;
4
- import org .junit .Before ;
5
- import org .junit .BeforeClass ;
6
- import org .junit .Test ;
4
+ import org .junit .jupiter .api .BeforeEach ;
5
+ import org .junit .jupiter .api .Test ;
7
6
8
- import static junit .framework . Assert .assertEquals ;
7
+ import static org . junit .jupiter . api . Assertions .assertEquals ;
9
8
10
9
public class _52Test {
11
- private static _52 .Solution1 solution1 ;
12
-
13
- @ BeforeClass
14
- public static void setup () {
15
- solution1 = new _52 .Solution1 ();
16
- }
17
-
18
- @ Before
19
- public void clear () {
20
- /**Solution1 has an instance variable `count`, so I'll have to create a new one for each test*/
21
- solution1 = new _52 .Solution1 ();
22
- }
23
-
24
- @ Test
25
- public void test1 () {
26
- assertEquals (1 , solution1 .totalNQueens (1 ));
27
- }
28
-
29
- @ Test
30
- public void test2 () {
31
- assertEquals (92 , solution1 .totalNQueens (8 ));
32
- }
33
-
34
- @ Test
35
- public void test3 () {
36
- assertEquals (0 , solution1 .totalNQueens (2 ));
37
- }
10
+ private static _52 .Solution1 solution1 ;
11
+
12
+ @ BeforeEach
13
+ public void setup () {
14
+ solution1 = new _52 .Solution1 ();
15
+ }
16
+
17
+ @ Test
18
+ public void test1 () {
19
+ assertEquals (1 , solution1 .totalNQueens (1 ));
20
+ }
21
+
22
+ @ Test
23
+ public void test2 () {
24
+ assertEquals (92 , solution1 .totalNQueens (8 ));
25
+ }
26
+
27
+ @ Test
28
+ public void test3 () {
29
+ assertEquals (0 , solution1 .totalNQueens (2 ));
30
+ }
38
31
}
You can’t perform that action at this time.
0 commit comments