2
2
3
3
import com .fishercoder .common .classes .ListNode ;
4
4
import com .fishercoder .common .utils .LinkedListUtils ;
5
- import org .junit .BeforeClass ;
6
- import org .junit .Test ;
7
- import org .junit .BeforeClass ;
8
- import org .junit .Test ;
9
5
import com .fishercoder .solutions ._1669 ;
6
+ import org .junit .Before ;
7
+ import org .junit .Test ;
8
+
9
+ import static org .junit .Assert .assertEquals ;
10
10
11
11
public class _1669Test {
12
12
private static _1669 .Solution1 solution1 ;
13
- private static _1669 .Solution1 solution2 ;
13
+ private static _1669 .Solution2 solution2 ;
14
14
private static ListNode l1 ;
15
15
private static ListNode l2 ;
16
16
private static int a ;
@@ -20,7 +20,7 @@ public class _1669Test {
20
20
private static ListNode expected ;
21
21
private static ListNode actual ;
22
22
23
- @ BeforeClass
23
+ @ Before
24
24
public static void setup () {
25
25
solution1 = new _1669 .Solution1 ();
26
26
solution2 = new _1669 .Solution2 ();
@@ -38,10 +38,10 @@ public void test1() {
38
38
39
39
@ Test
40
40
public void test2 () {
41
- l1 = ListNode . createSinglyLinkedList ( Arrays . asList ( 0 , 1 , 2 , 3 , 4 , 5 ) );
42
- l2 = ListNode . createSinglyLinkedList ( Arrays . asList ( 1000000 , 1000001 , 1000002 ) );
41
+ l1 = LinkedListUtils . contructLinkedList ( new int []{ 0 , 1 , 2 , 3 , 4 , 5 } );
42
+ l2 = LinkedListUtils . contructLinkedList ( new int []{ 1000000 , 1000001 , 1000002 } );
43
43
a = 3 ;
44
44
b = 4 ;
45
- assertEquals (ListNode . createSinglyLinkedList ( Arrays . asList ( 0 , 1 , 2 , 1000000 , 1000001 , 1000002 , 5 ) ), solution2 .mergeInBetween (l1 , a , b , l2 ));
45
+ assertEquals (LinkedListUtils . contructLinkedList ( new int []{ 0 , 1 , 2 , 1000000 , 1000001 , 1000002 , 5 } ), solution2 .mergeInBetween (l1 , a , b , l2 ));
46
46
}
47
47
}
0 commit comments