public void SaveContact_WithValidContact_Test() { ContactData target = new ContactData(); Contact contact = new Contact() { Email = "*****@*****.**", Name = "test User", Phone = "555-555-5555" }; bool expected = true; bool actual = target.SaveContact(contact); Assert.AreEqual(expected, actual); }
public void SearchContactsByName_ValidName_Test() { ContactData target = new ContactData(); Contacts testContacts = target.GetContactsByName("test User"); Assert.IsTrue(testContacts.Count>0); }
public void SearchContactsByName_InvalidName_Test() { ContactData target = new ContactData(); Contacts testContacts = target.GetContactsByName("something"); Assert.AreEqual(0, testContacts.Count); }
public void SearchContactsByName_EmptyName_Test() { ContactData target = new ContactData(); Contacts testContacts = target.GetContactsByName(""); Assert.AreEqual(0,testContacts.Count); }
public void GetContacts_Test() { ContactData target = new ContactData(); Contacts testContacts = target.GetContacts(); Assert.IsTrue(testContacts.Count>0); }
public static IContactData GetContactInterface() { IContactData myContactData = myContactData= new ContactData(); return myContactData; }