public void store_a_withdraw_transaction()
        {
            _transactionFactory.CreateWithdrawTransaction(Arg.Any <int>()).Returns(info => new Transaction(-(int)info[0], SOME_TIME));

            _accountService.Withdraw(50);

            _transactionRepository.Received().Add(new Transaction(-50, SOME_TIME));
        }
예제 #2
0
 public ITransactionStatus Withdraw(Account account, decimal amount) =>
 _transactionFactory.CreateWithdrawTransaction(account, amount).Process();
예제 #3
0
        public void Withdraw(int amount)
        {
            var withdrawTransaction = _transactionFactory.CreateWithdrawTransaction(amount);

            _transactionRepository.Add(withdrawTransaction);
        }