public void AccountApplicationService_Remove() { var rule = new RuleBuilder().WithDays(3).WithType(RuleType.UpUntil).WithPenalty(2).WithInterestPerDay(0.2m).Builder(); var account = new AccountBuilder().WithRule(rule).Builder(); _ruleRepository.Add(rule); _accountRepository.Add(account); _unitOfWork.Commit(); _accountApplicationService.Remove(account.Id); var result = _accountRepository.Get(new Filter()); result.entities.Should().HaveCount(0); }
public IActionResult Delete(Guid id) { _accountApplicationService.Remove(id); return(Response()); }