Skip to content

Commit e50a1ff

Browse files
migrate 63 to junit5
1 parent 94b924b commit e50a1ff

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

Diff for: src/test/java/com/fishercoder/_63Test.java

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

33
import com.fishercoder.solutions._63;
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 _63Test {
10-
private static _63.Solution1 solution1;
11-
private static int[][] obstacleGrid;
10+
private static _63.Solution1 solution1;
11+
private static int[][] obstacleGrid;
1212

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

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

27-
@Test
28-
public void test2() {
29-
obstacleGrid = new int[][] {
30-
{0, 0, 0},
31-
{0, 1, 0},
32-
{0, 0, 0},
33-
};
34-
assertEquals(2, solution1.uniquePathsWithObstacles(obstacleGrid));
35-
}
27+
@Test
28+
public void test2() {
29+
obstacleGrid = new int[][]{
30+
{0, 0, 0},
31+
{0, 1, 0},
32+
{0, 0, 0},
33+
};
34+
assertEquals(2, solution1.uniquePathsWithObstacles(obstacleGrid));
35+
}
3636

37-
@Test
38-
public void test3() {
39-
int[][] obstacleGrid = new int[][] {
40-
{1, 0}
41-
};
42-
assertEquals(0, solution1.uniquePathsWithObstacles(obstacleGrid));
43-
}
37+
@Test
38+
public void test3() {
39+
int[][] obstacleGrid = new int[][]{
40+
{1, 0}
41+
};
42+
assertEquals(0, solution1.uniquePathsWithObstacles(obstacleGrid));
43+
}
4444
}

0 commit comments

Comments
 (0)