Skip to content

Commit cc0e179

Browse files
migrate 74 to junit5
1 parent 0bfc3fa commit cc0e179

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed
+20-20
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
package com.fishercoder;
22

33
import com.fishercoder.solutions._74;
4-
import org.junit.BeforeClass;
5-
import org.junit.Test;
4+
import org.junit.jupiter.api.BeforeEach;
5+
import org.junit.jupiter.api.Test;
66

7-
import static junit.framework.Assert.assertEquals;
7+
import static org.junit.jupiter.api.Assertions.assertEquals;
88

99
public class _74Test {
10-
private static _74.Solution1 solution1;
11-
private static int target;
12-
private static int[][] matrix;
10+
private static _74.Solution1 solution1;
11+
private static int target;
12+
private static int[][] matrix;
1313

14-
@BeforeClass
15-
public static void setup() {
16-
solution1 = new _74.Solution1();
17-
}
14+
@BeforeEach
15+
public void setup() {
16+
solution1 = new _74.Solution1();
17+
}
1818

19-
@Test
20-
public void test1() {
21-
target = 3;
22-
matrix = new int[][] {
23-
{1, 3, 5, 7},
24-
{10, 11, 16, 20},
25-
{23, 30, 34, 50},
26-
};
27-
assertEquals(true, solution1.searchMatrix(matrix, target));
28-
}
19+
@Test
20+
public void test1() {
21+
target = 3;
22+
matrix = new int[][]{
23+
{1, 3, 5, 7},
24+
{10, 11, 16, 20},
25+
{23, 30, 34, 50},
26+
};
27+
assertEquals(true, solution1.searchMatrix(matrix, target));
28+
}
2929
}

0 commit comments

Comments
 (0)