|
3 | 3 | import com.fishercoder.common.classes.ListNode;
|
4 | 4 | import com.fishercoder.solutions._160;
|
5 | 5 | import org.junit.BeforeClass;
|
| 6 | +import org.junit.Ignore; |
6 | 7 | import org.junit.Test;
|
7 | 8 |
|
8 | 9 | import static org.junit.Assert.assertEquals;
|
9 | 10 |
|
10 | 11 | public class _160Test {
|
11 |
| - private static _160.Solution1 solution1; |
12 |
| - private static _160.Solution2 solution2; |
13 |
| - private static _160.Solution3 solution3; |
14 |
| - private static ListNode headA; |
15 |
| - private static ListNode headB; |
16 |
| - private static ListNode expected; |
| 12 | + private static _160.Solution1 solution1; |
| 13 | + private static _160.Solution2 solution2; |
| 14 | + private static _160.Solution3 solution3; |
| 15 | + private static ListNode headA; |
| 16 | + private static ListNode headB; |
| 17 | + private static ListNode expected; |
17 | 18 |
|
18 |
| - @BeforeClass |
19 |
| - public static void setup() { |
20 |
| - solution1 = new _160.Solution1(); |
21 |
| - solution2 = new _160.Solution2(); |
22 |
| - solution3 = new _160.Solution3(); |
23 |
| - } |
| 19 | + @BeforeClass |
| 20 | + public static void setup() { |
| 21 | + solution1 = new _160.Solution1(); |
| 22 | + solution2 = new _160.Solution2(); |
| 23 | + solution3 = new _160.Solution3(); |
| 24 | + } |
24 | 25 |
|
25 |
| - @Test |
26 |
| - public void test1() { |
27 |
| - headA = new ListNode(3); |
28 |
| - headB = new ListNode(2); |
29 |
| - headB.next = new ListNode(3); |
30 |
| - expected = new ListNode(3); |
31 |
| - /**TODO: both solution1 and solution2 are ACCEPTED on OJ, but somehow it's not passing in this unit test.*/ |
32 |
| -// assertEquals(expected, solution1.getIntersectionNode(headA, headB)); |
33 |
| -// assertEquals(expected, solution2.getIntersectionNode(headA, headB)); |
34 |
| - assertEquals(expected, solution3.getIntersectionNode(headA, headB)); |
35 |
| - } |
| 26 | + @Test |
| 27 | + @Ignore |
| 28 | + public void test1() { |
| 29 | + headA = new ListNode(3); |
| 30 | + headB = new ListNode(2); |
| 31 | + headB.next = new ListNode(3); |
| 32 | + expected = new ListNode(3); |
| 33 | + /**TODO: both solution1 and solution2 are ACCEPTED on OJ, but somehow it's not passing in this unit test.*/ |
| 34 | + assertEquals(expected, solution1.getIntersectionNode(headA, headB)); |
| 35 | + } |
36 | 36 |
|
| 37 | + @Test |
| 38 | + @Ignore |
| 39 | + public void test2() { |
| 40 | + headA = new ListNode(3); |
| 41 | + headB = new ListNode(2); |
| 42 | + headB.next = new ListNode(3); |
| 43 | + expected = new ListNode(3); |
| 44 | + /**TODO: both solution1 and solution2 are ACCEPTED on OJ, but somehow it's not passing in this unit test.*/ |
| 45 | + assertEquals(expected, solution2.getIntersectionNode(headA, headB)); |
| 46 | + } |
| 47 | + |
| 48 | + @Test |
| 49 | + public void test3() { |
| 50 | + headA = new ListNode(3); |
| 51 | + headB = new ListNode(2); |
| 52 | + headB.next = new ListNode(3); |
| 53 | + expected = new ListNode(3); |
| 54 | + assertEquals(expected, solution3.getIntersectionNode(headA, headB)); |
| 55 | + } |
37 | 56 | }
|
0 commit comments