Exemplo n.º 1
0
        public void GetDozenByQuantity_Test()
        {
            lotoFacilControllerTest = new LotoFacilController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = lotoFacilControllerTest.GetDozenByQuantity();

            Assert.IsType <OkObjectResult>(result.Result);
        }
Exemplo n.º 2
0
        public void GetDozenByQuantity_ThrowsException_Test()
        {
            mockRepo.Setup(m => m.GetAll()).Throws <Exception>();
            lotoFacilControllerTest = new LotoFacilController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = lotoFacilControllerTest.GetDozenByQuantity();

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