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