public void UpdateContactInDB_ShouldReturn_False_IfContactsNotFound() { bool expected = false; AddressBookModel modelObj = new AddressBookModel(); modelObj.FirstName = "Rakesh"; modelObj.LastName = "Kumar"; modelObj.Address = "Street 67,Navi Mumbai, Maharastra"; modelObj.City = "Mumbai"; modelObj.State = "Maharastra"; modelObj.Zip = "951245"; modelObj.PhoneNo = "9865326578"; bool result = AddressBookDBWork.UpdateContactInDB(modelObj); Assert.AreEqual(expected, result); }
public void UpdateContactInDB_ShouldReturn_True_IfContactFound_And_ContactGotUpdated() { bool expected = true; AddressBookModel modelObj = new AddressBookModel(); modelObj.FirstName = "Rakesh"; modelObj.LastName = "Mehta"; modelObj.Address = "Street 67,Navi Mumbai, Maharastra"; modelObj.City = "Mumbai"; modelObj.State = "Maharastra"; modelObj.Zip = "951245"; modelObj.PhoneNo = "9865326578"; modelObj.Email = "*****@*****.**"; bool result = AddressBookDBWork.UpdateContactInDB(modelObj); Assert.AreEqual(expected, result); }