/** addAll adds each element from the given collection */ public void testAddAll() { List full = populatedArray(3); Vector v = new Vector(); v.add(three); v.add(four); v.add(five); full.addAll(v); assertEquals(6, full.size()); }
/** containsAll returns true for collection with subset of elements */ public void testContainsAll() { List full = populatedArray(3); Vector v = new Vector(); v.add(one); v.add(two); assertTrue(full.containsAll(v)); v.add(six); assertFalse(full.containsAll(v)); }
/** removeAll removes all elements from the given collection */ public void testRemoveAll() { List full = populatedArray(3); Vector v = new Vector(); v.add(one); v.add(two); full.removeAll(v); assertEquals(1, full.size()); }