|
1 | 1 | package com.fishercoder;
|
2 | 2 |
|
3 | 3 | 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; |
6 | 6 |
|
7 |
| -import static org.junit.Assert.assertEquals; |
| 7 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
8 | 8 |
|
9 | 9 | 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; |
12 | 12 |
|
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 | + } |
17 | 17 |
|
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 | + } |
26 | 26 |
|
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 | + } |
36 | 36 |
|
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 | + } |
44 | 44 | }
|
0 commit comments