public void GetApplication_ShouldReturnModelOrNull() { const int id = 123; var model = LoanApplicationModelFactory.CreateBasicModel().WithId(id); _fakeLoanApplicationContextFacade.LoanApplicationModels.Add(model); _target.GetApplication(id).Should().NotBeNull(); _target.GetApplication(123123).Should().BeNull(); }
public IActionResult GetLoanApplication(int id) { var data = _loanApplicationLogic.GetApplication(id); if (data == null) { return(NotFound()); } return(Ok(data)); }