Пример #1
0
        public void GetResults_Test()
        {
            duplaSenaControllerTest = new DuplaSenaController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = duplaSenaControllerTest.GetResults();

            Assert.IsType <OkObjectResult>(result.Result);
        }
Пример #2
0
        public void GetResults_ThrowsException_Test()
        {
            mockRepo.Setup(m => m.GetAll()).Throws <Exception>();
            duplaSenaControllerTest = new DuplaSenaController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = duplaSenaControllerTest.GetResults();

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