|
1 | 1 | package com.fishercoder;
|
2 | 2 |
|
3 | 3 | 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 | + |
4 | 8 | import java.util.Arrays;
|
5 | 9 | import java.util.List;
|
6 |
| -import org.junit.BeforeClass; |
7 |
| -import org.junit.Ignore; |
8 |
| -import org.junit.Test; |
9 | 10 |
|
10 |
| -import static org.junit.Assert.assertEquals; |
| 11 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
11 | 12 |
|
12 | 13 | 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; |
16 | 17 |
|
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 | + } |
21 | 22 |
|
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 | + } |
29 | 30 | }
|
0 commit comments