private void checkRemove() throws Exception { ArrayList4<Integer> list = retrieveAndAssertNullArrayList4(); Assert.areEqual(ArrayList4Asserter.CAPACITY - 1, list.size()); for (int i = 0; i < ArrayList4Asserter.CAPACITY - 1; ++i) { Assert.areEqual(new Integer(i + 1), list.get(i)); } }
private void checkListSizeAndContents(int expectedSize) throws Exception { ArrayList4<Integer> list = retrieveAndAssertNullArrayList4(); Assert.areEqual(expectedSize, list.size()); for (int i = 0; i < expectedSize; ++i) { Assert.areEqual(new Integer(i), list.get(i)); } }
private void checkClear() throws Exception { ArrayList4<Integer> list = retrieveAndAssertNullArrayList4(); Assert.areEqual(0, list.size()); }