8000 migrate _28 test to Junit5 · aav789/Leetcode@6f3d32d · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f3d32d

Browse files
migrate _28 test to Junit5
1 parent 2a84281 commit 6f3d32d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
package com.fishercoder;
22

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

99
public class _28Test {
10-
private static _28.Solution1 solution1;
10+
private static _28.Solution1 solution1;
1111

12-
@Before
13-
public void setupForEachTest() {
14-
solution1 = new _28.Solution1();
15-
}
12+
@BeforeEach
13+
public void setup() {
14+
solution1 = new _28.Solution1();
15+
}
1616

17-
@Test
18-
public void test1() {
19-
assertEquals(0, solution1.strStr("a", ""));
20-
}
17+
@Test
18+
public void test1() {
19+
assertEquals(0, solution1.strStr("a", ""));
20+
}
2121

22-
@Test
23-
public void test2() {
24-
assertEquals(-1, solution1.strStr("mississippi", "a"));
25-
}
22+
@Test
23+
public void test2() {
24+
assertEquals(-1, solution1.strStr("mississippi", "a"));
25+
}
2626

27-
@Test
28-
public void te 5B22 st3() {
29-
assertEquals(0, solution1.strStr("a", "a"));
30-
}
27+
@Test
28+
public void test3() {
29+
assertEquals(0, solution1.strStr("a", "a"));
30+
}
3131
}

0 commit comments

Comments
 (0)
0