8000 migrate _30 test to Junit5 · githubniraj/Leetcode@156b9e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 156b9e5

Browse files
migrate _30 test to Junit5
1 parent 29bca97 commit 156b9e5

File tree

1 file changed

+19
-18
lines changed

1 file changed

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

33
import com.fishercoder.solutions._30;
4+
import org.junit.jupiter.api.BeforeEach;
5+
import org.junit.jupiter.api.Disabled;
6+
import org.junit.jupiter.api.Test;
7+
48
import java.util.Arrays;
59
import java.util.List;
6-
import org.junit.BeforeClass;
7-
import org.junit.Ignore;
8-
import org.junit.Test;
910

10-
import static org.junit.Assert.assertEquals;
11+
import static org.junit.jupiter.api.Assertions.assertEquals;
1112

1213
public class _30Test {
13-
private static _30.Solution1 solution1;
14-
private static String[] words;
15-
private static List<Integer> expected;
14+
private static _30.Solution1 solution1;
15+
private static String[] words;
16+
private static List<Integer> expected;
1617

17-
@BeforeClass
18-
public static void setup() {
19-
solution1 = new _30.Solution1();
20-
}
18+
@BeforeEach
19+
public void setup() {
20+
solution1 = new _30.Solution1();
21+
}
2122

22-
@Test
23-
@Ignore
24-
public void test1() {
25-
words = new String[] {"foo", "bar"};
26-
expected = Arrays.asList(0, 9);
27-
assertEquals(expected, solution1.findSubstring("barfoothefoobarman", words));
28-
}
23+
@Test
24+
@Disabled
25+
public void test1() {
26+
words = new String[]{"foo", "bar"};
27+
expected = Arrays.asList(0, 9);
28+
assertEquals(expected, solution1.findSubstring("barfoothefoobarman", words));
29+
}
2930
}

0 commit comments

Comments
 (0)
0