Пример #1
0
        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);
        }
Пример #2
0
        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);
        }