Browse Source

more added

Amy Gill 6 years ago
parent
commit
d917da0961
1 changed files with 29 additions and 2 deletions
  1. 29
    2
      src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java

+ 29
- 2
src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java View File

37
         Assert.assertTrue(testNumber.equals("[123.4]"));
37
         Assert.assertTrue(testNumber.equals("[123.4]"));
38
     }
38
     }
39
 
39
 
40
+//    @Test
41
+//    public void removeEntireEntryTest1(){
42
+//        testPhonebook.add("Allessandra", "4321");
43
+//        testPhonebook.add("Essarella", "4421");
44
+//        testPhonebook.removeEntireEntry("Allessandra");
45
+//        String testNumber = testPhonebook.lookup("Essarella");
46
+//        Assert.assertNotEquals(null, testNumber);
47
+//    }
48
+
49
+    @Test
50
+    public void removeEntireEntryTest2(){
51
+        testPhonebook.add("Andrea", "8888");
52
+        testPhonebook.add("Alexei", "8877");
53
+        testPhonebook.removeEntireEntry("Alexei");
54
+        String testList = testPhonebook.showNamesOnly();
55
+        Assert.assertTrue(testList.equals("Andrea\n"));
40
 
56
 
41
 
57
 
58
+    }
59
+
42
     @Test
60
     @Test
43
     public void testLookup() {
61
     public void testLookup() {
44
 
62
 
52
     }
70
     }
53
 
71
 
54
     @Test
72
     @Test
55
-    public void test (){
56
-
73
+    public void testListNamesOnly1 (){
74
+        testPhonebook.add("Andrea", "8888");
75
+        testPhonebook.add("Alexei", "8877");
76
+        testPhonebook.add("Addison", "1234");
77
+        testPhonebook.add("AdDy", "1234");
78
+        String actual = testPhonebook.showNamesOnly();
79
+        String expected = "AdDy\nAddison\nAlexei\nAndrea\n";
80
+        Assert.assertEquals(expected, actual);
57
     }
81
     }
58
 
82
 
83
+    @Test
84
+    public void
85
+
59
 }
86
 }