|
@@ -56,6 +56,37 @@ public class ListOpsTest {
|
56
|
56
|
|
57
|
57
|
@Ignore("Remove to run test")
|
58
|
58
|
@Test
|
|
59
|
+ public void testConcatOnNonEmptyListOfNestedLists() {
|
|
60
|
+ List<List<List<Character>>> listOfNestedLists = Arrays.asList(
|
|
61
|
+ Arrays.asList(
|
|
62
|
+ Collections.singletonList('1'),
|
|
63
|
+ Collections.singletonList('2')
|
|
64
|
+ ),
|
|
65
|
+ Collections.singletonList(
|
|
66
|
+ Collections.singletonList('3')
|
|
67
|
+ ),
|
|
68
|
+ Collections.singletonList(
|
|
69
|
+ Collections.emptyList()
|
|
70
|
+ ),
|
|
71
|
+ Collections.singletonList(
|
|
72
|
+ Arrays.asList('4', '5', '6')
|
|
73
|
+ )
|
|
74
|
+ );
|
|
75
|
+
|
|
76
|
+ assertEquals(
|
|
77
|
+ Arrays.asList(
|
|
78
|
+ Collections.singletonList('1'),
|
|
79
|
+ Collections.singletonList('2'),
|
|
80
|
+ Collections.singletonList('3'),
|
|
81
|
+ Collections.emptyList(),
|
|
82
|
+ Arrays.asList('4', '5', '6')
|
|
83
|
+ ),
|
|
84
|
+ ListOps.concat(listOfNestedLists)
|
|
85
|
+ );
|
|
86
|
+ }
|
|
87
|
+
|
|
88
|
+ @Ignore("Remove to run test")
|
|
89
|
+ @Test
|
59
|
90
|
public void testFilteringEmptyList() {
|
60
|
91
|
assertEquals(
|
61
|
92
|
Collections.emptyList(),
|
|
@@ -179,5 +210,5 @@ public class ListOpsTest {
|
179
|
210
|
Arrays.asList('7', '5', '3', '1'),
|
180
|
211
|
ListOps.reverse(Arrays.asList('1', '3', '5', '7')));
|
181
|
212
|
}
|
182
|
|
-
|
|
213
|
+
|
183
|
214
|
}
|