151152153154155156157158159
myList.addAll(42, new String[]{"fail"}); } @Test(expected = NullPointerException.class) public void testMyList_Illegal5() { myList = new MyArrayList(); myList.addAll(new String[]{"norm"}); myList.addAll(0, null); }
158159160161162163164165166
myList.addAll(0, null); } @Test(expected = IllegalArgumentException.class) public void testMyList_Illegal6() { myList = new MyArrayList(); myList.addAll(new String[]{"norm"}); myList.get(42); }
165166167168169170171172
myList.get(42); } @Test(expected = IllegalArgumentException.class) public void testMyList_Illegal7() { myList = new MyArrayList(); myList.get(-1); }
171172173174175176177178
myList.get(-1); } @Test(expected = IllegalArgumentException.class) public void testMyList_Illegal8() { myList = new MyArrayList(); myList.remove(-1); }
177178179180181182183184
myList.remove(-1); } @Test(expected = IllegalArgumentException.class) public void testMyList_Illegal9() { myList = new MyArrayList(); myList.set(-1, "fail"); }