-
Notifications
You must be signed in to change notification settings - Fork 0
/
SolutionTest.java
49 lines (45 loc) · 1.31 KB
/
SolutionTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class SolutionTest {
Solution solution;
@Before
public void setUp() throws Exception {
solution = new Solution();
}
@Test
public void abcabcbb_의_답은_3_abc(){
int result = solution.lengthOfLongestSubstring("abcabcbb");
assertEquals( 3, result);
}
@Test
public void bbbbb_의_답은_1_b(){
int result = solution.lengthOfLongestSubstring("bbbbb");
assertEquals(1, result);
}
@Test
public void pwwkew_의_답은_3_wke(){
int result = solution.lengthOfLongestSubstring("pwwkew");
assertEquals(3, result);
}
@Test
public void aab_의_답은_2_ab(){
int result = solution.lengthOfLongestSubstring("aab");
assertEquals(2, result);
}
@Test
public void dvdf_의_답은_3_vdf(){
int result = solution.lengthOfLongestSubstring("dvdf");
assertEquals(3, result);
}
@Test
public void anviaj_의_답은_5_nviaj(){
int result = solution.lengthOfLongestSubstring("anviaj");
assertEquals(5, result);
}
@Test
public void abcabdbb_의_답은_4_cabd(){
int result = solution.lengthOfLongestSubstring("abcabdbb");
assertEquals(4, result);
}
}