Example #1
0
        public void CallCountryServiceWithExpectedName(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.AddCountry(name);

            // Assert
            countryService.Verify(c => c.AddCountry(name), Times.Once);
        }