public void PutContact() { // Arrange ContactInformationController controller = new ContactInformationController(); var contactInfo = new ContactInformation(); contactInfo.PersonId = Guid.NewGuid().ToString(); contactInfo.FirstName = "abc"; contactInfo.LastName = "bcd"; contactInfo.PhoneNumber = "123456789"; contactInfo.Status = true; contactInfo.Email = contactInfo.FirstName + "@" + contactInfo.LastName + ".com"; // Act var result = controller.PostContact(contactInfo); result.PhoneNumber = string.Empty; controller.PutContact(result.PersonId, result); var dbItem = controller.GetContact(result.PersonId); controller.DeleteContact(dbItem); // Assert Assert.IsTrue(Match(dbItem, result)); }