public void DownloadResultsFromSource_ThrowsException_Test() { mockLotteryService.Setup(s => s.Load("LotoFacil")).Throws <EntryPointNotFoundException>(); lotoFacilControllerTest = new LotoFacilController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object); var result = lotoFacilControllerTest.DownloadResultsFromSource(); Assert.IsType <NotFoundObjectResult>(result.Result); }
public void DownloadResultsFromSource_Test() { mockLotteryService.SetReturnsDefault(listOfLottery); lotoFacilControllerTest = new LotoFacilController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object); var result = lotoFacilControllerTest.DownloadResultsFromSource(); Assert.IsType <OkObjectResult>(result.Result); }