Ejemplo n.º 1
0
        public async Task GivenAccountService_WhenCallSignUpAccount_IfMemberIsQualifiedToSignUp_ShouldRerunAccount()
        {
            // assign
            var member          = MemberDataBuilder.CreateMember(1, null, null, null);
            var evaluatedResult = AccountSignUpResult.Success();
            var account         = AccountDataBuilder.CreateAccount(1, null);

            MockAccountSignUpStrategyResult(evaluatedResult, member);
            MockAccountSequenceNumber(100000001);
            _accountFactory.Create("ZIP0100000001", member.Id).Returns(account);

            // act
            var signedUpAccount = await _accountService.SignUpAccount(member);

            // assert
            await _accountDataAccessor.Received(1).Create(signedUpAccount);

            signedUpAccount.ShouldBe(account);
        }
Ejemplo n.º 2
0
 public AccountSignUpResult CanSignUp(Member member, AccountSignUpStrategy strategy)
 {
     return(AccountSignUpResult.Success());
 }