コード例 #1
0
        public void GetAllFlights_Success_Test()
        {
            var res = controller.Get_AllFlights() as OkObjectResult;

            Assert.IsNotNull(res);
            Assert.AreEqual(200, res.StatusCode);
            Assert.IsInstanceOf <List <Flight> >(res.Value);
        }
        public void Get_All_Flights_Test()
        {
            mock.Setup(x => x.GetFlights()).Returns(flights);
            var controller = new AvailabilityController(mock.Object);
            var result     = controller.Get_AllFlights() as OkObjectResult;

            Assert.IsNotNull(result);
            Assert.AreEqual(200, result.StatusCode);
            Assert.IsInstanceOf <List <Flight> >(result.Value);
        }