|
@@ -9,40 +9,40 @@ import org.junit.Assert;
|
9
|
9
|
import java.util.ArrayList;
|
10
|
10
|
|
11
|
11
|
public class ArrayListCombinerTest {
|
12
|
|
-// Employee foo = new Employee("FOO", 100);
|
13
|
|
-// Manager bar = new Manager("BAR", 100);
|
14
|
|
-// @Test
|
15
|
|
-// public void testExtendCombiner() throws Exception {
|
16
|
|
-// // Given an array list with employees
|
17
|
|
-// ArrayList<Employee> first = new ArrayList<>();
|
18
|
|
-// first.add(foo);
|
19
|
|
-// // An an array list with managers
|
20
|
|
-// ArrayList<Manager> second = new ArrayList<>();
|
21
|
|
-// second.add(bar);
|
22
|
|
-// // When I combine them
|
23
|
|
-// ArrayListCombiner.extendCombiner(first, second);
|
24
|
|
-// // Then I should get an arrayList with both
|
25
|
|
-// ArrayList<Employee> expected = new ArrayList<>();
|
26
|
|
-// expected.add(foo);
|
27
|
|
-// expected.add(bar);
|
28
|
|
-// Assert.assertEquals(expected, first);
|
29
|
|
-// }
|
30
|
|
-//
|
31
|
|
-// @Test
|
32
|
|
-// public void testSuperCombiner() throws Exception {
|
33
|
|
-// // Given an array list with employees
|
34
|
|
-// ArrayList<Employee> first = new ArrayList<>();
|
35
|
|
-// first.add(foo);
|
36
|
|
-// // An an array list with managers
|
37
|
|
-// ArrayList<Manager> second = new ArrayList<>();
|
38
|
|
-// second.add(bar);
|
39
|
|
-// // When I combine them
|
40
|
|
-// ArrayListCombiner.superCombiner(first, second);
|
41
|
|
-// // Then I should get an arrayList with both
|
42
|
|
-// ArrayList<Employee> expected = new ArrayList<>();
|
43
|
|
-// expected.add(foo);
|
44
|
|
-// expected.add(bar);
|
45
|
|
-// Assert.assertEquals(expected, first);
|
46
|
|
-// }
|
|
12
|
+ Employee foo = new Employee("FOO", 100);
|
|
13
|
+ Manager bar = new Manager("BAR", 100);
|
|
14
|
+ @Test
|
|
15
|
+ public void testExtendCombiner() throws Exception {
|
|
16
|
+ // Given an array list with employees
|
|
17
|
+ ArrayList<Employee> first = new ArrayList<>();
|
|
18
|
+ first.add(foo);
|
|
19
|
+ // An an array list with managers
|
|
20
|
+ ArrayList<Manager> second = new ArrayList<>();
|
|
21
|
+ second.add(bar);
|
|
22
|
+ // When I combine them
|
|
23
|
+ ArrayListCombiner.extendCombiner(first, second);
|
|
24
|
+ // Then I should get an arrayList with both
|
|
25
|
+ ArrayList<Employee> expected = new ArrayList<>();
|
|
26
|
+ expected.add(foo);
|
|
27
|
+ expected.add(bar);
|
|
28
|
+ Assert.assertEquals(expected, first);
|
|
29
|
+ }
|
|
30
|
+
|
|
31
|
+ @Test
|
|
32
|
+ public void testSuperCombiner() throws Exception {
|
|
33
|
+ // Given an array list with employees
|
|
34
|
+ ArrayList<Employee> first = new ArrayList<>();
|
|
35
|
+ first.add(foo);
|
|
36
|
+ // An an array list with managers
|
|
37
|
+ ArrayList<Manager> second = new ArrayList<>();
|
|
38
|
+ second.add(bar);
|
|
39
|
+ // When I combine them
|
|
40
|
+ ArrayListCombiner.superCombiner(first, second);
|
|
41
|
+ // Then I should get an arrayList with both
|
|
42
|
+ ArrayList<Employee> expected = new ArrayList<>();
|
|
43
|
+ expected.add(foo);
|
|
44
|
+ expected.add(bar);
|
|
45
|
+ Assert.assertEquals(expected, first);
|
|
46
|
+ }
|
47
|
47
|
|
48
|
48
|
}
|