public void Get_all_returns_data() { actionAndBenefitsRepository.GetAll().Returns(this.GetListOfActionAndBenefits()); List <IdentifiableDTO <ActionAndBenefitsDTO> > returnedList = actionAndBenefitsService.GetAll().ToList(); Assert.Equal(2, returnedList.Count); }
public IActionResult GetAll() { try { return(Ok(_actionAndBenefitsService.GetAll())); } catch (NotFoundEntityException e) { return(StatusCode(404)); } catch (InternalServerErrorException e) { return(StatusCode(500)); } }