/** Test of elementExists method, of class Set. */ @Test public void testElementExists() { Set<Integer> set = new Set<Integer>(); assertFalse(set.elementExists(1)); set.addElement(1); assertTrue(set.elementExists(1)); }
/** Test of addElement method, of class Set. */ @Test public void testAddElement() { Set<String> set = new Set<String>(); set.addElement("m"); set.addElement("h"); set.addElement("m"); assertTrue(set.elementExists("m")); assertFalse(set.elementExists("n")); }
/** Test of deleteElement method, of class Set. */ @Test(expected = ElementNotFoundException.class) public void testDeleteElement() throws Exception { Set<Integer> set = new Set<Integer>(); set.deleteElement(3); set.addElement(1); set.addElement(4); set.deleteElement(1); assertFalse(set.elementExists(1)); }