예제 #1
0
        public void Should_Throws_Exception_Given_Nonexistent_Account()
        {
            Guid accountId = Guid.NewGuid();
            Guid expenseId = Guid.NewGuid();

            _accountReadOnlyRepository
            .Setup(x => x.Get(accountId))
            .ReturnsAsync(default(Account));

            Assert.ThrowsAsync <AccountNotFoundException>(() => _removeUseCase.Execute <Expense>(accountId, expenseId));

            _accountReadOnlyRepository.Verify(x => x.Get(accountId), Times.Once);
        }
예제 #2
0
        public async Task <IActionResult> Delete([FromBody] RemoveFinanceStatementRequest request)
        {
            RemoveFinanceStatementResult result = await _remove.Execute <Investment>(request.AccountId, request.Id);

            return(Ok(result));
        }