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)); }
public ITransactionStatus Withdraw(Account account, decimal amount) => _transactionFactory.CreateWithdrawTransaction(account, amount).Process();
public void Withdraw(int amount) { var withdrawTransaction = _transactionFactory.CreateWithdrawTransaction(amount); _transactionRepository.Add(withdrawTransaction); }