public async Task <IActionResult> AddMakeTransfer([FromBody] MakeTransferRequest makeTransferRequest) { var output = await _makeTransferUseCase.Run(makeTransferRequest.Name, makeTransferRequest.Amount, makeTransferRequest.FromAccountId, makeTransferRequest.ToAccountId); _presenter.Fill(output); return(_presenter.ViewModel); }
public async void ShouldDebitAmountInFromAccountCorrectly() { AssumeAccountInRepository(); _fromAccount.AddRevenue("Initial Balance", 200); var makeTransferOutput = await _sut.Run("New Transfer", 100, _fromAccountId, _toAccountId); var expectedBalance = 100; Assert.Equal(expectedBalance, makeTransferOutput.FromAccountBalance); }