Exemplo n.º 1
0
        public void CallAddAirlineOnAirlineServiceWithExpectedName(string name)
        {
            // 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.AddAirline(name);

            // Assert
            airlineService.Verify(a => a.AddAirline(name), Times.Once);
        }