Exemplo n.º 1
0
        public void GetAllFlightsTest()
        {
            var moqFlightsRepository = new FlightsRepository(_moqContext);

            var flights = moqFlightsRepository.GetAllFlights();

            // Asset
            Assert.IsNotNull(flights);
            //Ensure there is only 1 flight.
            Assert.AreEqual(1, flights.Count);
            //Ensure flight id is same as set in moq object
            Assert.AreEqual(101, flights[0].FlightId);
        }