Skip to content

Commit 2316295

Browse files
committedMar 6, 2024
migrate 64 to junit5
1 parent e50a1ff commit 2316295

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed
 

Diff for: ‎src/test/java/com/fishercoder/_64Test.java

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
package com.fishercoder;
22

33
import com.fishercoder.solutions._64;
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 org.junit.Assert.assertEquals;
7+
import static org.junit.jupiter.api.Assertions.assertEquals;
88

99
public class _64Test {
10-
private static _64.Solution1 solution1;
11-
private static int[][] grid;
10+
private static _64.Solution1 solution1;
11+
private static int[][] grid;
1212

13-
@BeforeClass
14-
public static void setup() {
15-
solution1 = new _64.Solution1();
16-
}
13+
@BeforeEach
14+
public void setup() {
15+
solution1 = new _64.Solution1();
16+
}
1717

18-
@Test
19-
public void test1() {
20-
grid = new int[][] {
21-
{1, 2},
22-
{1, 1}
23-
};
24-
assertEquals(3, solution1.minPathSum(grid));
25-
}
18+
@Test
19+
public void test1() {
20+
grid = new int[][]{
21+
{1, 2},
22+
{1, 1}
23+
};
24+
assertEquals(3, solution1.minPathSum(grid));
25+
}
2626

27-
@Test
28-
public void test2() {
29-
grid = new int[][] {{1}};
30-
assertEquals(1, solution1.minPathSum(grid));
31-
}
27+
@Test
28+
public void test2() {
29+
grid = new int[][]{{1}};
30+
assertEquals(1, solution1.minPathSum(grid));
31+
}
3232

33-
@Test
34-
public void test3() {
35-
grid = new int[][] {
36-
{1, 3, 1},
37-
{1, 5, 1},
38-
{4, 2, 1}
39-
};
40-
assertEquals(7, solution1.minPathSum(grid));
41-
}
33+
@Test
34+
public void test3() {
35+
grid = new int[][]{
36+
{1, 3, 1},
37+
{1, 5, 1},
38+
{4, 2, 1}
39+
};
40+
assertEquals(7, solution1.minPathSum(grid));
41+
}
4242
}

0 commit comments

Comments
 (0)
Please sign in to comment.