|
|
@@ -29,7 +29,7 @@ public class ListOpsTest {
|
|
29
|
29
|
}
|
|
30
|
30
|
|
|
31
|
31
|
@Test
|
|
32
|
|
- @Ignore
|
|
|
32
|
+ @Ignore("Remove to run test")
|
|
33
|
33
|
public void shouldReturnTheCorrectLengthOfAnNonEmptyList() {
|
|
34
|
34
|
final List<Integer> list = Collections.unmodifiableList(
|
|
35
|
35
|
Arrays.asList(0, 1, 2, 3, 4)
|
|
|
@@ -41,7 +41,7 @@ public class ListOpsTest {
|
|
41
|
41
|
}
|
|
42
|
42
|
|
|
43
|
43
|
@Test
|
|
44
|
|
- @Ignore
|
|
|
44
|
+ @Ignore("Remove to run test")
|
|
45
|
45
|
public void shouldReverseAnEmptyList() {
|
|
46
|
46
|
final List<Integer> actual = ListOps.reverse(EMPTY_LIST);
|
|
47
|
47
|
|
|
|
@@ -50,7 +50,7 @@ public class ListOpsTest {
|
|
50
|
50
|
}
|
|
51
|
51
|
|
|
52
|
52
|
@Test
|
|
53
|
|
- @Ignore
|
|
|
53
|
+ @Ignore("Remove to run test")
|
|
54
|
54
|
public void shouldReverseANonEmptyList() {
|
|
55
|
55
|
final List<Integer> list = Collections.unmodifiableList(
|
|
56
|
56
|
Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8)
|
|
|
@@ -66,7 +66,7 @@ public class ListOpsTest {
|
|
66
|
66
|
}
|
|
67
|
67
|
|
|
68
|
68
|
@Test
|
|
69
|
|
- @Ignore
|
|
|
69
|
+ @Ignore("Remove to run test")
|
|
70
|
70
|
public void shouldMapAnEmptyListAndReturnAnEmptyList() {
|
|
71
|
71
|
final List<Integer> actual = ListOps.map(EMPTY_LIST, x -> x + 1);
|
|
72
|
72
|
|
|
|
@@ -75,7 +75,7 @@ public class ListOpsTest {
|
|
75
|
75
|
}
|
|
76
|
76
|
|
|
77
|
77
|
@Test
|
|
78
|
|
- @Ignore
|
|
|
78
|
+ @Ignore("Remove to run test")
|
|
79
|
79
|
public void shouldMapNonEmptyList() {
|
|
80
|
80
|
final List<Integer> list
|
|
81
|
81
|
= Collections.unmodifiableList(Arrays.asList(1, 3, 5, 7));
|
|
|
@@ -87,7 +87,7 @@ public class ListOpsTest {
|
|
87
|
87
|
}
|
|
88
|
88
|
|
|
89
|
89
|
@Test
|
|
90
|
|
- @Ignore
|
|
|
90
|
+ @Ignore("Remove to run test")
|
|
91
|
91
|
public void shouldFilterAnEmptyListanddReturnAnEmptyList() {
|
|
92
|
92
|
final List<Integer> actual = ListOps.filter(EMPTY_LIST, x -> x > 0);
|
|
93
|
93
|
|
|
|
@@ -96,7 +96,7 @@ public class ListOpsTest {
|
|
96
|
96
|
}
|
|
97
|
97
|
|
|
98
|
98
|
@Test
|
|
99
|
|
- @Ignore
|
|
|
99
|
+ @Ignore("Remove to run test")
|
|
100
|
100
|
public void shouldFilterNonEmptyList() {
|
|
101
|
101
|
Predicate<Integer> predicate = x -> x % 2 > 0;
|
|
102
|
102
|
final List<Integer> list = Collections.unmodifiableList(
|
|
|
@@ -113,7 +113,7 @@ public class ListOpsTest {
|
|
113
|
113
|
}
|
|
114
|
114
|
|
|
115
|
115
|
@Test
|
|
116
|
|
- @Ignore
|
|
|
116
|
+ @Ignore("Remove to run test")
|
|
117
|
117
|
public void shouldConcatenateZeroLists() {
|
|
118
|
118
|
List<Integer> actual = ListOps.concat();
|
|
119
|
119
|
|
|
|
@@ -122,7 +122,7 @@ public class ListOpsTest {
|
|
122
|
122
|
}
|
|
123
|
123
|
|
|
124
|
124
|
@Test
|
|
125
|
|
- @Ignore
|
|
|
125
|
+ @Ignore("Remove to run test")
|
|
126
|
126
|
public void shouldConcatenateOneNonEmptyList() {
|
|
127
|
127
|
final List<Integer> list
|
|
128
|
128
|
= Collections.unmodifiableList(
|
|
|
@@ -137,7 +137,7 @@ public class ListOpsTest {
|
|
137
|
137
|
}
|
|
138
|
138
|
|
|
139
|
139
|
@Test
|
|
140
|
|
- @Ignore
|
|
|
140
|
+ @Ignore("Remove to run test")
|
|
141
|
141
|
public void shouldConcatenateOneEmptyList() {
|
|
142
|
142
|
final List<Integer> actual = ListOps.concat(EMPTY_LIST);
|
|
143
|
143
|
|
|
|
@@ -146,7 +146,7 @@ public class ListOpsTest {
|
|
146
|
146
|
}
|
|
147
|
147
|
|
|
148
|
148
|
@Test
|
|
149
|
|
- @Ignore
|
|
|
149
|
+ @Ignore("Remove to run test")
|
|
150
|
150
|
public void shouldConcatenateTwoEmptyLists() {
|
|
151
|
151
|
final List<Integer> actual = ListOps.concat(EMPTY_LIST, EMPTY_LIST);
|
|
152
|
152
|
|
|
|
@@ -155,7 +155,7 @@ public class ListOpsTest {
|
|
155
|
155
|
}
|
|
156
|
156
|
|
|
157
|
157
|
@Test
|
|
158
|
|
- @Ignore
|
|
|
158
|
+ @Ignore("Remove to run test")
|
|
159
|
159
|
public void shouldConcatenateOneEmptyAndOneNonEmptyLists() {
|
|
160
|
160
|
final List<Integer> list
|
|
161
|
161
|
= Collections.unmodifiableList(
|
|
|
@@ -171,7 +171,7 @@ public class ListOpsTest {
|
|
171
|
171
|
}
|
|
172
|
172
|
|
|
173
|
173
|
@Test
|
|
174
|
|
- @Ignore
|
|
|
174
|
+ @Ignore("Remove to run test")
|
|
175
|
175
|
public void shouldConcatenateOneNonEmptyAndOneEmptyLists() {
|
|
176
|
176
|
final List<Integer> list
|
|
177
|
177
|
= Collections.unmodifiableList(
|
|
|
@@ -187,7 +187,7 @@ public class ListOpsTest {
|
|
187
|
187
|
}
|
|
188
|
188
|
|
|
189
|
189
|
@Test
|
|
190
|
|
- @Ignore
|
|
|
190
|
+ @Ignore("Remove to run test")
|
|
191
|
191
|
public void shouldConcatenateTwoListsWithSameElements() {
|
|
192
|
192
|
final List<Integer> list1 = Collections.unmodifiableList(
|
|
193
|
193
|
Arrays.asList(0, 1, 2, 3, 4)
|
|
|
@@ -205,7 +205,7 @@ public class ListOpsTest {
|
|
205
|
205
|
}
|
|
206
|
206
|
|
|
207
|
207
|
@Test
|
|
208
|
|
- @Ignore
|
|
|
208
|
+ @Ignore("Remove to run test")
|
|
209
|
209
|
public void shouldConcatenateSeveralLists() {
|
|
210
|
210
|
final List<Integer> list1 = Collections.unmodifiableList(
|
|
211
|
211
|
Arrays.asList(0, 1, 2, 3)
|
|
|
@@ -232,7 +232,7 @@ public class ListOpsTest {
|
|
232
|
232
|
}
|
|
233
|
233
|
|
|
234
|
234
|
@Test
|
|
235
|
|
- @Ignore
|
|
|
235
|
+ @Ignore("Remove to run test")
|
|
236
|
236
|
public void shouldReturnIdentityWhenAnEmptyListIsReduced() {
|
|
237
|
237
|
final int expected = 0;
|
|
238
|
238
|
final int actual
|
|
|
@@ -242,7 +242,7 @@ public class ListOpsTest {
|
|
242
|
242
|
}
|
|
243
|
243
|
|
|
244
|
244
|
@Test
|
|
245
|
|
- @Ignore
|
|
|
245
|
+ @Ignore("Remove to run test")
|
|
246
|
246
|
public void shouldCalculateTheSumOfANonEmptyIntegerList() {
|
|
247
|
247
|
final List<Integer> list = Collections.unmodifiableList(
|
|
248
|
248
|
Arrays.asList(0, 1, 2, 3, 4)
|
|
|
@@ -273,7 +273,7 @@ public class ListOpsTest {
|
|
273
|
273
|
};
|
|
274
|
274
|
|
|
275
|
275
|
@Test
|
|
276
|
|
- @Ignore
|
|
|
276
|
+ @Ignore("Remove to run test")
|
|
277
|
277
|
public void shouldReduceAnEmptyListAndANonEmptyListAndReturnConcatenation() {
|
|
278
|
278
|
final List<Integer> list = Collections.unmodifiableList(
|
|
279
|
279
|
Arrays.asList(0, 1, 2, 3, 4, 5)
|
|
|
@@ -292,7 +292,7 @@ public class ListOpsTest {
|
|
292
|
292
|
}
|
|
293
|
293
|
|
|
294
|
294
|
@Test
|
|
295
|
|
- @Ignore
|
|
|
295
|
+ @Ignore("Remove to run test")
|
|
296
|
296
|
public void shouldReduceTwoNonEmptyListsAndReturnConcatenation() {
|
|
297
|
297
|
final List<Integer> listOne = Collections.unmodifiableList(
|
|
298
|
298
|
Arrays.asList(0, 1, 2, 3, 4)
|