예제 #1
0
        public void GetDozenByQuantity_Test()
        {
            lotoGolControllerTest = new LotoGolController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = lotoGolControllerTest.GetDozenByQuantity();

            Assert.IsType <OkObjectResult>(result.Result);
        }
예제 #2
0
        public void GetDozenByQuantity_ThrowsException_Test()
        {
            mockRepo.Setup(m => m.GetAll()).Throws <Exception>();
            lotoGolControllerTest = new LotoGolController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = lotoGolControllerTest.GetDozenByQuantity();

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