|
@@ -44,7 +44,7 @@ public class PhoneBookTest
|
44
|
44
|
public void addEntry()
|
45
|
45
|
{
|
46
|
46
|
PhoneBook phoneBoo1 = new PhoneBook();
|
47
|
|
- phoneBoo1.addEntry("nicholas", "3027387978");
|
|
47
|
+ phoneBoo1.add("nicholas", "3027387978");
|
48
|
48
|
assertEquals("nicholas: 3027387978", phoneBoo1.display());
|
49
|
49
|
}
|
50
|
50
|
|
|
@@ -52,8 +52,8 @@ public class PhoneBookTest
|
52
|
52
|
public void addTwoNumberForOnePersonTest()
|
53
|
53
|
{
|
54
|
54
|
PhoneBook phoneBoo1 = new PhoneBook();
|
55
|
|
- phoneBoo1.addEntry("nick", "302");
|
56
|
|
- phoneBoo1.addNumberTo("nick", "103");
|
|
55
|
+ phoneBoo1.add("nick", "302");
|
|
56
|
+ phoneBoo1.add("nick", "103");
|
57
|
57
|
assertEquals("nick: 302103", phoneBoo1.display());
|
58
|
58
|
}
|
59
|
59
|
|
|
@@ -61,7 +61,7 @@ public class PhoneBookTest
|
61
|
61
|
public void reverseLoopupTest()
|
62
|
62
|
{
|
63
|
63
|
PhoneBook phoneBoo1 = new PhoneBook();
|
64
|
|
- phoneBoo1.addEntry("nick", "302");
|
|
64
|
+ phoneBoo1.add("nick", "302");
|
65
|
65
|
assertEquals("nick", phoneBoo1.reverseLoopup("302"));
|
66
|
66
|
}
|
67
|
67
|
|
|
@@ -69,7 +69,7 @@ public class PhoneBookTest
|
69
|
69
|
public void lookupTest()
|
70
|
70
|
{
|
71
|
71
|
PhoneBook phoneBoo1 = new PhoneBook();
|
72
|
|
- phoneBoo1.addEntry("nick", "302");
|
|
72
|
+ phoneBoo1.add("nick", "302");
|
73
|
73
|
assertEquals("302", phoneBoo1.lookUp("nick"));
|
74
|
74
|
}
|
75
|
75
|
|
|
@@ -77,7 +77,7 @@ public class PhoneBookTest
|
77
|
77
|
public void RemoveRecordTest()
|
78
|
78
|
{
|
79
|
79
|
PhoneBook phoneBoo2 = new PhoneBook();
|
80
|
|
- phoneBoo2.addEntry("m", "302");
|
|
80
|
+ phoneBoo2.add("m", "302");
|
81
|
81
|
phoneBoo2.removeRecord("m");
|
82
|
82
|
assertEquals("", phoneBoo2.lookUp("m"));
|
83
|
83
|
}
|
|
@@ -86,8 +86,8 @@ public class PhoneBookTest
|
86
|
86
|
public void removePhoneNumberTest()
|
87
|
87
|
{
|
88
|
88
|
PhoneBook phoneBoo1 = new PhoneBook();
|
89
|
|
- phoneBoo1.addEntry("m", "123");
|
90
|
|
- phoneBoo1.addNumberTo("m", "456");
|
|
89
|
+ phoneBoo1.add("m", "123");
|
|
90
|
+ phoneBoo1.add("m", "456");
|
91
|
91
|
phoneBoo1.removePhoneNumber("m", "456");
|
92
|
92
|
assertEquals("123", phoneBoo1.lookUp("m"));
|
93
|
93
|
}
|