public void TestFindAllContact() { List<Contact> c = new List<Contact>(); using (ContactDAOImpl daoImp = new ContactDAOImpl()) { c = daoImp.FindAll(); Assert.IsNotNull(c); } }
public void TestFindByIdContact() { using (ContactDAOImpl daoImp = new ContactDAOImpl()) { Contact c = daoImp.FindByID("*****@*****.**"); Assert.AreEqual(c.ContactID, 2); } }
public void TestInsertContact() { Employee e = new Employee() { EmployeeID = 1, Firstname = "Noma", Lastname = "Mhlophe", PersonnelNum = 3335, JobTitle = "IS Operations Manager", Position = "Finance Services Manager", ExitDate = null, HireDate = null, }; using (EmployeeDAOImpl daoImpl = new EmployeeDAOImpl()) { bool isPer = daoImpl.Persist(e); Assert.IsTrue(isPer); } Contact c = new Contact() { ContactID = 1, EmployeeID = e.EmployeeID, CellNumber = "0768923715", TellphoneNumber = "0219399999", Email = "*****@*****.**" }; using (ContactDAOImpl daoImpl = new ContactDAOImpl()) { bool isPer = daoImpl.Persist(c); Assert.IsTrue(isPer); } }
public void TestMergeContact() { Contact c = new Contact() { ContactID = 3, CellNumber = "0768923745", TellphoneNumber = "0219399900", Email = "*****@*****.**" }; using (ContactDAOImpl daoImp = new ContactDAOImpl()) { bool isPer = daoImp.Merge(c); Assert.IsTrue(isPer); } }
public void TestPersistContact() { Contact c = new Contact() { ContactID = 5, CellNumber = "0768992895", TellphoneNumber = "0219399999", Email = "*****@*****.**" }; using (ContactDAOImpl daoImpl = new ContactDAOImpl()){ bool isPer = daoImpl.Persist(c); Assert.IsTrue(isPer); } }