Beispiel #1
0
        public void GetFilteredValues_BadKey()
        {
            var filterHandler = new FlightFilterHandler();

            var result = filterHandler.GetFilteredValues(FlightFilterHandlerTestData.BadKey, new List <Flight>());

            Assert.Null(result);
        }
Beispiel #2
0
        public void GetFilteredValues_Exception()
        {
            var filterHandler = new FlightFilterHandler();

            Action actual = () => filterHandler.GetFilteredValues(1, null);

            var exception = Assert.Throws <ArgumentNullException>(actual);

            Assert.Equal(FlightFilterHandlerTestData.ExceptionMessage, exception.Message);
        }
Beispiel #3
0
        public void GetFlightsForFilterThree_Ok()
        {
            var flightBuilder = new FlightBuilder();

            var filterHandler = new FlightFilterHandler();

            var flights = flightBuilder.GetFlights();

            var longFlights = FlightFilterHandlerTestData.GetDeletedFlightsForFilter_3(flights);

            var result = filterHandler.GetFilteredValues(3, flights);

            foreach (var longFlight in longFlights)
            {
                Assert.All(result, item => Assert.DoesNotContain(longFlight, result));
            }
        }