Exemplo n.º 1
0
        public void GetAllLoteries_Test()
        {
            lotoGolControllerTest = new LotoGolController(mockwebService.Object, mockRepo.Object, mockLog.Object, mockLotteryService.Object);

            var result = lotoGolControllerTest.GetResults();

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

            var result = lotoGolControllerTest.GetResults();

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