Kaynağa Gözat

Add updated test

Ronak Lakhotia 6 yıl önce
ebeveyn
işleme
9e8deea0d9

+ 11
- 4
exercises/list-ops/src/test/java/ListOpsTest.java Dosyayı Görüntüle

@@ -57,13 +57,20 @@ public class ListOpsTest {
57 57
     @Ignore("Remove to run test")
58 58
     @Test
59 59
     public void testConcatOnNonEmptyListOfNestedLists() {
60
-        List<List<Character>> listOfLists = Arrays.asList(
61
-                Arrays.asList(Collections.singletonList('1'), Collections.singletonList('2')),
62
-                Arrays.asList(Collections.singletonList('3'), Collections.emptyList()),
60
+        List<List<List<Character>>> listOfNestedLists = Arrays.asList(
61
+                Arrays.asList(Collections.singletonList('1'),
62
+                Collections.singletonList('2')),
63
+                Arrays.asList(Collections.singletonList('3'),
64
+                Collections.emptyList()),
63 65
                 Arrays.asList(Arrays.asList('4', '5', '6'));
64 66
 
67
+        assertEquals(
68
+                Arrays.asList(Collections.singletonList('1'),
69
+                Collections.singletonList('2'), Collections.singletonList('3'),
70
+                Collections.emptyList(), Arrays.asList(4, 5, 6)),
71
+                ListOps.concat(listOfNestedLists));
65 72
     }
66
-    
73
+
67 74
     @Ignore("Remove to run test")
68 75
     @Test
69 76
     public void testFilteringEmptyList() {