public void ChangeEmailForContactCommand() { var sutBuilder = new ContactCommandBuilder <ChangeEmailForContactCommand>(); var sut = sutBuilder.Build() as ChangeEmailForContactCommand; sut.Email = "New"; sut.OriginalEmail = "Original"; sut.Execute(); sutBuilder.ContactMock.Verify(s => s.ChangeEmail(sut.Email, sut.OriginalEmail), Times.Once); }
public void ChangeContactOfBirthDateCommand() { var sutBuilder = new ContactCommandBuilder <ChangeBirthDateOfContactCommand>(); var sut = sutBuilder.Build() as ChangeBirthDateOfContactCommand; sut.OriginalBirthDate = DateTime.Now; sut.BirthDate = DateTime.Now; sut.Execute(); sutBuilder.ContactMock.Verify(s => s.ChangeBirthDate(sut.BirthDate, sut.OriginalBirthDate), Times.Once); }
public void RenameCommand() { var sutBuilder = new ContactCommandBuilder <RenameContactCommand>(); var sut = sutBuilder.Build() as RenameContactCommand; sut.Name = "New Name"; sut.OriginalName = "Original Name"; sut.Execute(); sutBuilder.ContactMock.Verify(s => s.Rename(sut.Name, sut.OriginalName), Times.Once); }