def test_CanDisplaySetOfContacts(self): contact1 = self.phone_vcard contact2 = self.email_vcard cm = ContactManager() cm.add_contact(contact1) cm.add_contact(contact2) self.assertTrue(contact1 in cm.contacts()) self.assertTrue(contact2 in cm.contacts())
def test_CanFindAContact(self): contact1 = self.phone_vcard cm = ContactManager() cm.add_contact(contact1) self.assertTrue(contact1 in cm.contacts())
def test_can_create_a_contact_manager(self): cm = ContactManager() self.assertTrue(cm)
def test_contact_manager_has_one_correct_contact(self): cm = ContactManager() contact = "bob" cm.add_contact(contact) self.assertTrue(1 == len(cm.contacts())) self.assertTrue(contact in cm.contacts())
def test_contact_manager_has_zero_contacts(self): cm = ContactManager() self.assertTrue(0 == len(cm.contacts()))