22
33import com .fishercoder .common .classes .ListNode ;
44import 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 ;
95import com .fishercoder .solutions ._1669 ;
6+ import org .junit .Before ;
7+ import org .junit .Test ;
8+
9+ import static org .junit .Assert .assertEquals ;
1010
1111public class _1669Test {
1212private static _1669 .Solution1 solution1 ;
13- private static _1669 .Solution1 solution2 ;
13+ private static _1669 .Solution2 solution2 ;
1414private static ListNode l1 ;
1515private static ListNode l2 ;
1616private static int a ;
@@ -20,7 +20,7 @@ public class _1669Test {
2020private static ListNode expected ;
2121private static ListNode actual ;
2222
23- @ BeforeClass
23+ @ Before
2424public static void setup () {
2525solution1 =new _1669 .Solution1 ();
2626solution2 =new _1669 .Solution2 ();
@@ -38,10 +38,10 @@ public void test1() {
3838
3939@ Test
4040public 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 } );
4343a =3 ;
4444b =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 ));
4646 }
4747}