private void givenEmailAddressWasChanged() { var command = ChangeCustomerEmailAddress.Build(customerID.Value, changedEmailAddress.Value); changedConfirmationHash = command.ConfirmationHash; registeredCustomer = Customer2.ChangeEmailAddress(registeredCustomer, command); }
void changeEmailAddress() { // Given givenARegisteredCustomer(); // When changeCustomerEmailAddress var command = ChangeCustomerEmailAddress.Build(customerID.Value, changedEmailAddress.Value); var changedCustomer = Customer2.ChangeEmailAddress(registeredCustomer, command); // Then the emailAddress and confirmationHash should be changed and the emailAddress should be unconfirmed Assert.Equal(command.EmailAddress, changedCustomer.EmailAddress); Assert.Equal(command.ConfirmationHash, changedCustomer.ConfirmationHash); Assert.False(changedCustomer.IsEmailAddressConfirmed); }