private void checkSet() throws Exception { ArrayList4<Integer> list = retrieveAndAssertNullArrayList4(); Assert.areEqual(ArrayList4Asserter.CAPACITY, list.size()); Assert.areEqual(new Integer(1), list.get(0)); for (int i = 1; i < ArrayList4Asserter.CAPACITY; ++i) { Assert.areEqual(new Integer(i), 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 checkAddAll() throws Exception { ArrayList4<Integer> list = retrieveAndAssertNullArrayList4(); for (int i = 0; i < ArrayList4Asserter.CAPACITY * 2; ++i) { Assert.areEqual(new Integer(i), list.get(i)); } }