Skip to content

Commit d7bc9a1

Browse files
add test for 21
1 parent a229b58 commit d7bc9a1

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._21;
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 _21Test {
13+
private static _21.Solution1 solution1;
14+
private static ListNode l1;
15+
private static ListNode l2;
16+
17+
@BeforeClass
18+
public static void setup() {
19+
solution1 = new _21.Solution1();
20+
}
21+
22+
@Test
23+
public void test1() {
24+
l1 = ListNode.createSinglyLinkedList(Arrays.asList(1, 3, 5));
25+
l2 = ListNode.createSinglyLinkedList(Arrays.asList(2, 4));
26+
assertEquals(ListNode.createSinglyLinkedList(Arrays.asList(1, 2, 3, 4, 5)), solution1.mergeTwoLists(l1, l2));
27+
}
28+
29+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy