public void CallAddFlightOnFlightServiceWIthExpectedFlight()
        {
            // Arrange
            var countryService  = new Mock <ICountryService>();
            var airlineService  = new Mock <IAirlineService>();
            var flightService   = new Mock <IFlightService>();
            var mappingService  = new Mock <IMappingService>();
            var cityService     = new Mock <ICityService>();
            var airportService  = new Mock <IAirportService>();
            var jobService      = new Mock <IJobService>();
            var adminController = new AdminController(countryService.Object, mappingService.Object, cityService.Object, airlineService.Object, airportService.Object, flightService.Object, jobService.Object);

            var flight = new FlightModel();

            var expectedFlight = new Flight()
            {
                Id = 1
            };

            mappingService.Setup(m => m.Map <Flight>(flight)).Returns(expectedFlight);

            // Act
            adminController.AddFlight(flight);

            // Assert
            flightService.Verify(f => f.AddFlight(expectedFlight), Times.Once);
        }
        public void CallGetAllAirlinesOnAirlineService()
        {
            // Arrange
            var countryService  = new Mock <ICountryService>();
            var airlineService  = new Mock <IAirlineService>();
            var flightService   = new Mock <IFlightService>();
            var mappingService  = new Mock <IMappingService>();
            var cityService     = new Mock <ICityService>();
            var airportService  = new Mock <IAirportService>();
            var jobService      = new Mock <IJobService>();
            var adminController = new AdminController(countryService.Object, mappingService.Object, cityService.Object, airlineService.Object, airportService.Object, flightService.Object, jobService.Object);

            // Act
            adminController.AddFlight();

            // Assert
            airlineService.Verify(a => a.GetAllAirlines(), Times.Once);
        }
        public void CallMapOnMappingServiceWithExpectedFlight()
        {
            // Arrange
            var countryService  = new Mock <ICountryService>();
            var airlineService  = new Mock <IAirlineService>();
            var flightService   = new Mock <IFlightService>();
            var mappingService  = new Mock <IMappingService>();
            var cityService     = new Mock <ICityService>();
            var airportService  = new Mock <IAirportService>();
            var jobService      = new Mock <IJobService>();
            var adminController = new AdminController(countryService.Object, mappingService.Object, cityService.Object, airlineService.Object, airportService.Object, flightService.Object, jobService.Object);

            var flight = new FlightModel();

            // Act
            adminController.AddFlight(flight);

            // Assert
            mappingService.Verify(m => m.Map <Flight>(flight), Times.Once);
        }