public void IsAirportValid_IfAirportCodeIsNullOrEmpty_ReturnsFalse(string airportCode)
        {
            var airportService = new AirportServices(new Mock <IAirportRepository>().Object);

            var result = airportService.IsAirportValid(airportCode);

            Assert.False(result, "Airport Code is not valid");
        }
        public void IsAirportValid_IfAirportCodeIsNotValid_ReturnsFalse(string airportCode)
        {
            var mockAirportRepository = new Mock <IAirportRepository>();

            mockAirportRepository.Setup(x => x.FetchAirportDetail(airportCode)).Returns(EmptyAirportListForInvalidAirportCode(airportCode));
            var airportService = new AirportServices(mockAirportRepository.Object);

            var result = airportService.IsAirportValid(airportCode);

            Assert.False(result);
        }
        public void IsAirportValid_IfAirportCodeIsValid_ReturnsTrue(string airportCode)
        {
            var mockAirportRepository = new Mock <IAirportRepository>();

            mockAirportRepository.Setup(x => x.FetchAirportDetail(airportCode)).Returns(ExpectedAirportDetail(airportCode));
            var airportService = new AirportServices(mockAirportRepository.Object);

            var actual = airportService.IsAirportValid(airportCode);

            Assert.True(actual);
        }