Exemplo n.º 1
0
        /**
         * Methods for WHEN
         */

        private void WHEN_RegisterCustomer()
        {
            var registerCustomer = RegisterCustomer.Build(emailAddress.Value, name.GivenName, name.FamilyName);

            customerRegistered = Customer7.Register(registerCustomer);
            customerID         = registerCustomer.CustomerId;
            confirmationHash   = registerCustomer.ConfirmationHash;
        }
Exemplo n.º 2
0
        private void WHEN_ConfirmEmailAddress_With(Hash confirmationHash)
        {
            var command = ConfirmCustomerEmailAddress.Build(customerID.Value, confirmationHash.Value);

            try {
                recordedEvents = Customer7.ConfirmEmailAddress(currentState, command);
            } catch (NullReferenceException e) {
                throw new XunitException(THelper.propertyIsNull("confirmationHash"));
            }
        }
Exemplo n.º 3
0
        private void WHEN_ChangeEmailAddress_With(EmailAddress emailAddress)
        {
            var command = ChangeCustomerEmailAddress.Build(customerID.Value, emailAddress.Value);

            try {
                recordedEvents          = Customer7.ChangeEmailAddress(currentState, command);
                changedConfirmationHash = command.ConfirmationHash;
            } catch (NullReferenceException e) {
                throw new XunitException(THelper.propertyIsNull("emailAddress"));
            }
        }