Ejemplo n.º 1
0
        public void Get_all_returns_data()
        {
            actionAndBenefitsRepository.GetAll().Returns(this.GetListOfActionAndBenefits());

            List <IdentifiableDTO <ActionAndBenefitsDTO> > returnedList = actionAndBenefitsService.GetAll().ToList();

            Assert.Equal(2, returnedList.Count);
        }
Ejemplo n.º 2
0
 public IActionResult GetAll()
 {
     try
     {
         return(Ok(_actionAndBenefitsService.GetAll()));
     }
     catch (NotFoundEntityException e)
     {
         return(StatusCode(404));
     }
     catch (InternalServerErrorException e)
     {
         return(StatusCode(500));
     }
 }