Beispiel #1
0
        public void GetAllLoteries_Test()
        {
            lotoFacilControllerTest = new LotoFacilController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = lotoFacilControllerTest.GetResults();

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

            var result = lotoFacilControllerTest.GetResults();

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