148149150151152153154155156
myList.addAll(42, new String[]{"fail"}); } @Test(expected = NullPointerException.class) public void testMyList_Illegal5() { myList = new MyLinkedList(); myList.addAll(new String[]{"norm"}); myList.addAll(0, null); }
155156157158159160161162163
myList.addAll(0, null); } @Test(expected = IllegalArgumentException.class) public void testMyList_Illegal6() { myList = new MyLinkedList(); myList.addAll(new String[]{"norm"}); myList.get(42); }
162163164165166167168169
myList.get(42); } @Test(expected = IllegalArgumentException.class) public void testMyList_Illegal7() { myList = new MyLinkedList(); myList.get(-1); }
168169170171172173174175
myList.get(-1); } @Test(expected = IllegalArgumentException.class) public void testMyList_Illegal8() { myList = new MyLinkedList(); myList.remove(-1); }