Skip to content

Commit e2127f9

Browse files
add test for 3
1 parent 25f04b7 commit e2127f9

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.solutions._3;
4+
import org.junit.BeforeClass;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertEquals;
8+
9+
public class _3Test {
10+
private static _3.Solution1 solution1;
11+
private static _3.Solution2 solution2;
12+
private static _3.Solution3 solution3;
13+
private static _3.Solution4 solution4;
14+
15+
@BeforeClass
16+
public static void setup() {
17+
solution1 = new _3.Solution1();
18+
solution2 = new _3.Solution2();
19+
solution3 = new _3.Solution3();
20+
solution4 = new _3.Solution4();
21+
}
22+
23+
@Test
24+
public void test1() {
25+
assertEquals(3, solution1.lengthOfLongestSubstring("abcabcbb"));
26+
assertEquals(3, solution2.lengthOfLongestSubstring("abcabcbb"));
27+
assertEquals(3, solution3.lengthOfLongestSubstring("abcabcbb"));
28+
assertEquals(3, solution4.lengthOfLongestSubstring("abcabcbb"));
29+
}
30+
31+
}

0 commit comments

Comments
 (0)