Amy Gill 6 år sedan
förälder
incheckning
d917da0961
1 ändrade filer med 29 tillägg och 2 borttagningar
  1. 29
    2
      src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java

+ 29
- 2
src/test/java/com/zipcodewilmington/phonebook/PhoneBookTest.java Visa fil

@@ -37,8 +37,26 @@ public class PhoneBookTest {
37 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 60
     @Test
43 61
     public void testLookup() {
44 62
 
@@ -52,8 +70,17 @@ public class PhoneBookTest {
52 70
     }
53 71
 
54 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
 }