public WhenDepositingMoney()
        {
            _accountAuthorisationMock = new Mock <IAccountAuthorisation>();

            var container = Bootstrapper.BootstrapContainerAndAdapters(c =>
            {
                c.RegisterInstance(_accountAuthorisationMock.Object);
            });

            _command          = container.GetInstance <DepositCommand>();
            _bankAccountStore = container.GetInstance <IBankAccountStore>();
        }
        public WhenDepositingMoneyThrougCli()
        {
            var accountAuthorisationMock = new Mock <IAccountAuthorisation>();

            accountAuthorisationMock
            .Setup(a => a.RequestForDeposit(It.IsAny <BankAccount>()))
            .Returns(true);

            _bankAccountStore = new InMemoryBankAccountStore();

            _program = new Program(c =>
            {
                c.RegisterInstance(accountAuthorisationMock.Object);
                c.RegisterInstance(_bankAccountStore);
            });
        }
 public WithdrawUseCase(IBankAccountStore bankAccountStore, IAccountAuthorisation accountAuthorisation)
 {
     _bankAccountStore     = bankAccountStore;
     _accountAuthorisation = accountAuthorisation;
 }
 public DepositUseCase(IBankAccountStore bankAccountStore, IAccountAuthorisation accountAuthorisation)
 {
     _bankAccountStore     = bankAccountStore;
     _accountAuthorisation = accountAuthorisation;
 }
 public TransferUseCase(IBankAccountStore bankAccountStore, IAccountAuthorisation accountAuthorisation)
 {
     _bankAccountStore     = bankAccountStore;
     _accountAuthorisation = accountAuthorisation;
 }
Exemple #6
0
 public RetrieveBankAccountUseCase(IBankAccountStore bankAccountStore)
 {
     _bankAccountStore = bankAccountStore;
 }