public void NGUtil_SetContactPreferredName_NotEmptyPreferredName_Should_Set_PreferredName_To_PreferredName_WhenLastNameEmpty() { //Arrange var contact = new DTO.Contact { Id = "cid", FirstName = "System", LastName = "", PreferredName = "System" }; //Act NGUtils.SetContactPreferredName(contact); //Assert Assert.IsTrue("System" == contact.PreferredName); }
public void NGUtil_SetContactPreferredName_NotEmptyPreferredName_Should_Set_PreferredName_To_PreferredNamePlusLastName() { //Arrange var contact = new DTO.Contact { Id = "cid", FirstName = "firstname", LastName = "lastname", PreferredName = "preferredname" }; var preferrednamelastname = contact.PreferredName + " " + contact.LastName; //Act NGUtils.SetContactPreferredName(contact); //Assert Assert.IsTrue(preferrednamelastname == contact.PreferredName); }