예제 #1
0
        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();
        }
예제 #2
0
        public IActionResult GetLoanApplication(int id)
        {
            var data = _loanApplicationLogic.GetApplication(id);

            if (data == null)
            {
                return(NotFound());
            }
            return(Ok(data));
        }