Example #1
0
        private void givenEmailAddressWasChanged()
        {
            var command = ChangeCustomerEmailAddress.Build(customerID.Value, changedEmailAddress.Value);

            changedConfirmationHash = command.ConfirmationHash;
            registeredCustomer      = Customer2.ChangeEmailAddress(registeredCustomer, command);
        }
Example #2
0
        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);
        }