Пример #1
0
        public void DownloadResultsFromSource_ThrowsException_Test()
        {
            mockLotteryService.Setup(s => s.Load("DuplaSena")).Throws <EntryPointNotFoundException>();
            duplaSenaControllerTest = new DuplaSenaController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = duplaSenaControllerTest.DownloadResultsFromSource();

            Assert.IsType <NotFoundObjectResult>(result.Result);
        }
Пример #2
0
        public void DownloadResultsFromSource_Test()
        {
            mockLotteryService.SetReturnsDefault(listOfLottery);
            duplaSenaControllerTest = new DuplaSenaController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = duplaSenaControllerTest.DownloadResultsFromSource();

            Assert.IsType <OkObjectResult>(result.Result);
        }