@Before public void foo() throws Exception { deptDir = new ArrayListAddressBook(); deptDir.load("deptdir.txt"); dir = new ArrayListAddressBook(); }
@Test public void deptDirContainsHorstmann() { assertNotNull(deptDir.get("Horstmann", "Phone")); }
@Test(expected = NoSuchElementException.class) public void RemoveTester2() { assertNull(dir.remove("Me", "Phone")); }
@Test(expected = NoSuchElementException.class) public void RemoveTester3() { dir.put("Bob", "Phone", "2"); assertNull(dir.remove("Me", "Phone")); }
@Test(expected = NoSuchElementException.class) public void RemoveTester() { dir.put("Horstmann", "Phone", "2"); dir.remove("Horstmann", "Phone"); assertNull(dir.get("Horstmann", "Phone")); }