Exemple #1
0
        public ActionResult <ICollection <EncounterDTO> > GetAllEncounters()
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                var encounters = mapper.Map <EncounterDTO[]>(encounterBusinessLogic.GetAll());
                return(Ok(encounters));
            }
            catch (Exception e)
            {
                return(StatusCode(500, e.Message));
            }
        }
 public void GetAllTest()
 {
     encounterBL.GetAll();
     mockEncounterRepo.Verify(x => x.Get(null, null, It.IsAny <string>()), Times.Once());
 }