예제 #1
0
        /**
         * Methods for WHEN
         */

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

            customerRegistered = Customer5.Register(registerCustomer);
            customerID         = registerCustomer.CustomerId;
            confirmationHash   = registerCustomer.ConfirmationHash;
        }
예제 #2
0
        private void WHEN_ConfirmEmailAddress_With(Hash confirmationHash)
        {
            var command = ConfirmCustomerEmailAddress.Build(customerID.Value, confirmationHash.Value);

            try {
                recordedEvents = Customer5.ConfirmEmailAddress(eventStream, command);
            } catch (NullReferenceException e) {
                throw new XunitException(THelper.propertyIsNull("confirmationHash"));
            }
        }
예제 #3
0
        private void WHEN_ChangeEmailAddress_With(EmailAddress emailAddress)
        {
            var command = ChangeCustomerEmailAddress.Build(customerID.Value, emailAddress.Value);

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