|
|
@@ -1,6 +1,6 @@
|
|
1
|
1
|
import org.junit.Ignore;
|
|
2
|
|
-import org.junit.Test;
|
|
3
|
2
|
import org.junit.Rule;
|
|
|
3
|
+import org.junit.Test;
|
|
4
|
4
|
import org.junit.rules.ExpectedException;
|
|
5
|
5
|
|
|
6
|
6
|
import java.util.NoSuchElementException;
|
|
|
@@ -12,7 +12,7 @@ public class SimpleLinkedListTest {
|
|
12
|
12
|
|
|
13
|
13
|
@Rule
|
|
14
|
14
|
public ExpectedException thrown = ExpectedException.none();
|
|
15
|
|
-
|
|
|
15
|
+
|
|
16
|
16
|
@Test
|
|
17
|
17
|
public void aNewListIsEmpty() {
|
|
18
|
18
|
SimpleLinkedList list = new SimpleLinkedList();
|
|
|
@@ -74,7 +74,7 @@ public class SimpleLinkedListTest {
|
|
74
|
74
|
list.push(6);
|
|
75
|
75
|
list.push(5);
|
|
76
|
76
|
Integer[] expected = {5, 6, 7, 8, 9};
|
|
77
|
|
- assertEquals(list.asArray(Integer.class), expected);
|
|
|
77
|
+ assertArrayEquals(expected, list.asArray(Integer.class));
|
|
78
|
78
|
}
|
|
79
|
79
|
|
|
80
|
80
|
@Ignore("Remove to run test")
|
|
|
@@ -82,7 +82,7 @@ public class SimpleLinkedListTest {
|
|
82
|
82
|
public void canReturnEmptyListAsEmptyArray() {
|
|
83
|
83
|
SimpleLinkedList list = new SimpleLinkedList();
|
|
84
|
84
|
Object[] expected = {};
|
|
85
|
|
- assertEquals(list.asArray(Object.class), expected);
|
|
|
85
|
+ assertArrayEquals(expected, list.asArray(Object.class));
|
|
86
|
86
|
}
|
|
87
|
87
|
|
|
88
|
88
|
}
|