forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_133Test.java
43 lines (36 loc) · 1.07 KB
/
_133Test.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
package com.fishercoder;
import com.fishercoder.common.classes.UndirectedGraphNode;
import com.fishercoder.solutions._133;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static junit.framework.Assert.assertEquals;
/**
* Created by fishercoder on 1/15/17.
*/
public class _133Test {
private static _133 test;
private static UndirectedGraphNode expected;
private static UndirectedGraphNode actual;
@BeforeClass
public static void setup(){
test = new _133();
}
@Before
public void setupForEachTest(){
expected = null;
actual = null;
}
@Test
public void test1(){
UndirectedGraphNode node0 = new UndirectedGraphNode(0);
UndirectedGraphNode node1 = new UndirectedGraphNode(1);
UndirectedGraphNode node2 = new UndirectedGraphNode(2);
node0.neighbors.add(node1);
node0.neighbors.add(node2);
node1.neighbors.add(node2);
expected = node0;
actual = test.cloneGraph(expected);
assertEquals(expected, actual);
}
}