@Test(timeout = 200) public void testClear() { addBasic(); assertEquals("Size is incorrect after adding", 11, list.size()); list.clear(); assertEquals("Size isn't 0 after clearing the list", 0, list.size()); addJagged(); assertEquals("Size is incorrect after adding unordered numbers", 11, list.size()); list.clear(); assertEquals("Size isn't 0 after clearing the list", 0, list.size()); }
@Test(timeout = 1000) public void testClear2() { list.put(3); list.put(8); list.clear(); assertEquals(0, list.size()); }