|
@@ -18,9 +18,9 @@ public class PhoneBookTest {
|
18
|
18
|
@Test
|
19
|
19
|
public void addTest() {
|
20
|
20
|
PhoneBook testBook = new PhoneBook();
|
21
|
|
- testBook.addEntry("Luke", "6109998787");
|
22
|
|
- String testNumber = testBook.lookupNumber("Luke");
|
23
|
|
- Assert.assertTrue(testNumber.equals("6109998787,"));
|
|
21
|
+ testBook.addEntry("Joe", "1234567", "2345678");
|
|
22
|
+ String testNumber = testBook.lookupNumber("Joe");
|
|
23
|
+ Assert.assertTrue(testNumber.equals("1234567, 2345678,"));
|
24
|
24
|
|
25
|
25
|
}
|
26
|
26
|
|
|
@@ -89,7 +89,16 @@ public class PhoneBookTest {
|
89
|
89
|
|
90
|
90
|
}
|
91
|
91
|
|
92
|
|
-
|
|
92
|
+ @Test
|
|
93
|
+ public void RemoveNumberFromNameTest(){
|
|
94
|
+ PhoneBook testBook = new PhoneBook();
|
|
95
|
+ testBook.addEntry("Adam", "4864569090", "7879891212");
|
|
96
|
+ testBook.removeNumberFromName("Adam", "4864569090");
|
|
97
|
+ String expected = "7879891212,";
|
|
98
|
+ String actual = testBook.lookupNumber("Adam");
|
|
99
|
+ System.out.println(actual);
|
|
100
|
+ Assert.assertTrue(expected.equals(actual));
|
|
101
|
+ }
|
93
|
102
|
|
94
|
103
|
@Test
|
95
|
104
|
public void additionalPhoneNumberToKeyTest() {
|