10000 add test for 86 · Dannymmc/Leetcode@480ba2b · GitHub
[go: up one dir, main page]

Skip to content

Commit 480ba2b

Browse files
add test for 86
1 parent 61a913e commit 480ba2b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.common.classes.ListNode;
4+
import com.fishercoder.solutions._86;
5+
import org.junit.BeforeClass;
6+
import org.junit.Test;
7+
8+
import java.util.Arrays;
9+
10+
import static org.junit.Assert.assertEquals;
11+
12+
public class _86Test {
13+
private static _86.Solution1 solution1;
14+
private static ListNode head;
15+
private static ListNode expected;
16+
17+
@BeforeClass
18+
public static void setup() {
19+
solution1 = new _86.Solution1();
20+
}
21+
22+
@Test
23+
public void test1() {
24+
head = ListNode.createSinglyLinkedList(Arrays.asList(1, 4, 3, 2, 5, 2));
25+
expected = ListNode.createSinglyLinkedList(Arrays.asList(1, 2, 2, 4, 3, 5));
26+
assertEquals(expected, (solution1.partition(head, 3)));
27+
}
28+
29+
}

0 commit comments

Comments
 (0)
0