File tree 3 files changed +13
-11
lines changed
src/test/java/com/fishercoder
3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ repositories {
32
32
33
33
dependencies {
34
34
compile ' com.google.code.gson:gson:2.8.0'
35
- compile ' junit:junit:4.13'
36
35
compile group : ' org.apache.commons' , name : ' commons-collections4' , version : ' 4.0'
36
+
37
+ // TODO: to remove Junit4 after all tests are migrated to Junit5
38
+ compile ' junit:junit:4.13'
37
39
testCompile " junit:junit:4.13.1"
38
40
39
41
testImplementation ' org.junit.jupiter:junit-jupiter-api:5.8.1'
Original file line number Diff line number Diff line change 1
1
package com .fishercoder ;
2
2
3
3
import com .fishercoder .solutions ._1 ;
4
- import org .junit .BeforeClass ;
5
- import org .junit .Test ;
4
+ import org .junit .jupiter . api . BeforeEach ;
5
+ import org .junit .jupiter . api . Test ;
6
6
7
- import static org .junit .Assert .assertArrayEquals ;
7
+ import static org .junit .jupiter . api . Assertions .assertArrayEquals ;
8
8
9
9
public class _1Test {
10
10
private static _1 .Solution1 solution1 ;
11
11
private static int [] nums ;
12
12
13
- @ BeforeClass
14
- public static void setup () {
13
+ @ BeforeEach
14
+ public void setup () {
15
15
solution1 = new _1 .Solution1 ();
16
16
}
17
17
Original file line number Diff line number Diff line change 3
3
import com .fishercoder .common .classes .ListNode ;
4
4
import com .fishercoder .common .utils .LinkedListUtils ;
5
5
import com .fishercoder .solutions ._2 ;
6
- import org .junit .BeforeClass ;
7
- import org .junit .Test ;
6
+ import org .junit .jupiter . api . BeforeEach ;
7
+ import org .junit .jupiter . api . Test ;
8
8
9
- import static org .junit .Assert .assertEquals ;
9
+ import static org .junit .jupiter . api . Assertions .assertEquals ;
10
10
11
11
public class _2Test {
12
12
private static _2 .Solution1 solution1 ;
13
13
private static ListNode l1 ;
14
14
private static ListNode l2 ;
15
15
private static ListNode expected ;
16
16
17
- @ BeforeClass
18
- public static void setup () {
17
+ @ BeforeEach
18
+ public void setup () {
19
19
solution1 = new _2 .Solution1 ();
20
20
}
21
21
You can’t perform that action at this time.
0 commit comments