public void GetAllLoteries_Test() { lotoFacilControllerTest = new LotoFacilController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object); var result = lotoFacilControllerTest.GetResults(); Assert.IsType <OkObjectResult>(result.Result); }
public void GetAllLoteries_ThrowsException_Test() { mockRepo.Setup(m => m.GetAll()).Throws <Exception>(); lotoFacilControllerTest = new LotoFacilController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object); var result = lotoFacilControllerTest.GetResults(); Assert.IsType <NotFoundObjectResult>(result.Result); }