forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_127Test.java
36 lines (29 loc) · 855 Bytes
/
_127Test.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
package com.fishercoder;
import com.fishercoder.solutions._127;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
/**
* Created by stevesun on 6/5/17.
*/
public class _127Test {
private static _127 test;
private static List<String> wordList;
@BeforeClass
public static void setup(){
test = new _127();
}
@Test
public void test1(){
wordList = new ArrayList<>(Arrays.asList("hot","dot","dog","lot","log"));
assertEquals(0, test.ladderLength("hit", "cog", wordList));
}
@Test
public void test2(){
wordList = new ArrayList<>(Arrays.asList("hot","dot","dog","lot","log","cog"));
assertEquals(5, test.ladderLength("hit", "cog", wordList));
}
}