Example #1
0
 public ReportsController(TripService tripservice, DriverService driverService, VehicleService vehicleService, UserService userService, CorporateService corporateService)
 {
     if (tripservice == null)
     {
         throw new NullReferenceException("tripservice");
     }
     if (driverService == null)
     {
         throw new NullReferenceException("driverService");
     }
     if (vehicleService == null)
     {
         throw new NullReferenceException("vehicleService");
     }
     if (userService == null)
     {
         throw new NullReferenceException("userService");
     }
     if (corporateService == null)
     {
         throw new NullReferenceException("corporateService");
     }
     _corporateService = corporateService;
     _driverService    = driverService;
     _vehicleService   = vehicleService;
     _tripService      = tripservice;
     _userService      = userService;
 }
Example #2
0
 public BuyTicketCommand(ICustomerService customerService, IBankAccountService bankAccountService, ITripService tripService, ITicketService ticketService)
 {
     this.customerService    = customerService;
     this.bankAccountService = bankAccountService;
     this.tripService        = tripService;
     this.ticketService      = ticketService;
 }
Example #3
0
 public TripsController(ICompanyService companies, ITripService trips, ICountryService countries, UserManager <User> userManager)
 {
     this.companies   = companies;
     this.trips       = trips;
     this.countries   = countries;
     this.userManager = userManager;
 }
Example #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UserController"/> class.
        /// </summary>
        /// <param name="loggerService">Logger Service</param>
        /// <param name="userService">User Service</param>
        /// <param name="tripService">Trip Service</param>
        /// <param name="postService">Post Service</param>
        public UserController(
            ILoggerService loggerService,
            IUserService userService,
            ITripService tripService,
            IPostService postService)
            : base(loggerService)
        {
            if(userService == null)
            {
                throw new ArgumentNullException("User Service, User Controller");
            }

            if (tripService == null)
            {
                throw new ArgumentNullException("Trip Service, User Controller");
            }

            if (postService == null)
            {
                throw new ArgumentNullException("Post Service, User Controller");
            }

            this.userService = userService;
            this.tripService = tripService;
            this.postService = postService;
        }
 public TripServiceTests()
 {
     _context = InterviewContextFactory.Create();
     _mapper  = AutoMapperFactory.Create();
     _authorizationService = new AuthorizationService();
     _tripService          = new TripService(_context, _mapper, _authorizationService);
 }
Example #6
0
 public TripsController(
     Request request,
     ITripService _tripService)
     : base(request)
 {
     tripService = _tripService;
 }
 public NewsletterController(INewsletterService newsletterService, IHostService hostService,
                             ITripService tripService)
 {
     _newsletterService = newsletterService;
     _hostService       = hostService;
     _tripService       = tripService;
 }
 public NewsletterController(INewsletterService newsletterService, IHostService hostService,
     ITripService tripService)
 {
     _newsletterService = newsletterService;
     _hostService = hostService;
     _tripService = tripService;
 }
 public TripController(ITripService trip, IBudgetService budget,
                       ICommandDispatcher commandDispatcher, DataContext context) : base(commandDispatcher)
 {
     _budget  = budget;
     _context = context;
     _trip    = trip;
 }
Example #10
0
 public TripController(ITripService tripService, IAuthService authService, IContextFactory <ApplicationContext> contextFactory, ICustomRequestCultureProvider customRequestCultureProvider)
 {
     _tripService    = tripService ?? throw new ArgumentNullException(nameof(tripService));
     _authService    = authService ?? throw new ArgumentNullException(nameof(authService));
     _contextFactory = contextFactory ?? throw new ArgumentNullException(nameof(contextFactory));
     _customRequestCultureProvider = customRequestCultureProvider ?? throw new ArgumentNullException(nameof(customRequestCultureProvider));
 }
 public VehicleTripRegistrationService(IUserService userManagerSvc,
                                       IRepository <VehicleTripRegistration, Guid> repo,
                                       ITripService tripSvc,
                                       IVehicleService vehicleSvc,
                                       IServiceHelper serviceHelper,
                                       IEmployeeService employeeSvc, IRepository <Route> routerepo,
                                       IUnitOfWork unitOfWork,
                                       IDriverService driverSvc, ISeatManagementService seatManagementService,
                                       IRepository <JourneyManagement, Guid> journeyManagementRepo, IRepository <Vehicle> vehRepo,
                                       IRepository <Manifest, Guid> manRepo)
 {
     _userManagerSvc        = userManagerSvc;
     _repo                  = repo;
     _tripSvc               = tripSvc;
     _vehicleSvc            = vehicleSvc;
     _serviceHelper         = serviceHelper;
     _employeeSvc           = employeeSvc;
     _driverSvc             = driverSvc;
     _unitOfWork            = unitOfWork;
     _seatManagementService = seatManagementService;
     _journeyManagementRepo = journeyManagementRepo;
     _routerepo             = routerepo;
     _vehRepo               = vehRepo;
     _manRepo               = manRepo;
 }
 public TripController(IUserService users, IChatRoomService chatRoom, ITripService trips, ICommentService comments)
     : base(users, chatRoom)
 {
     this.trips           = trips;
     this.comments        = comments;
     this.ViewBag.Creator = "asc";
 }
Example #13
0
 public ChangeTripStatusCommand(ITripService tripService, IBusStationService busStationService, IArrivedTripService arrivedTripService, ITicketService ticketService)
 {
     this.tripService        = tripService;
     this.busStationService  = busStationService;
     this.arrivedTripService = arrivedTripService;
     this.ticketService      = ticketService;
 }
 public TripController(ITripService tripService
                       , ITripQueries tripQuery
                       , IMapperService mapper)
 {
     _tripService = tripService;
     _tripQuery   = tripQuery;
     _mapper      = mapper;
 }
Example #15
0
 public ImportController(ITripService tripService, ILineService lineService, IVehicleDutyService vehicleDutyService, IWorkBlockService workBlockService, IDriverDutyService driverDutyService)
 {
     this._tripService        = tripService;
     this._lineService        = lineService;
     this._vehicleDutyService = vehicleDutyService;
     this._workBlockService   = workBlockService;
     this._driverDutyService  = driverDutyService;
 }
        public SearchController(ITripService tripService, IMappingProvider mappingProvider)
        {
            Guard.WhenArgument(tripService, nameof(tripService)).IsNull().Throw();
            Guard.WhenArgument(mappingProvider, nameof(mappingProvider)).IsNull().Throw();

            this.mappingProvider = mappingProvider;
            this.tripService     = tripService;
        }
        public DashboardController(ITripService tripService, IUserDashboardService userDashboardService)
        {
            Guard.WhenArgument(tripService, nameof(tripService)).IsNull().Throw();
            Guard.WhenArgument(userDashboardService, nameof(userDashboardService)).IsNull().Throw();

            this.tripService          = tripService;
            this.userDashboardService = userDashboardService;
        }
Example #18
0
        public ListTripsController(ITripService tripService, IMappingService mappingService)
        {
            Guard.WhenArgument(tripService, "Trip service is null.").IsNull().Throw();
            Guard.WhenArgument(mappingService, "Mapping service is null.").IsNull().Throw();

            this.mappingService = mappingService;
            this.tripService    = tripService;
        }
        public TripController(IUserService users, IChatRoomService chatRoom, ITripService trips, ICommentService comments)
            : base(users, chatRoom)
        {
            this.trips = trips;
            this.comments = comments;
            this.ViewBag.Creator = "asc";


        }
        public TripApplicationController(ITripService tripService, IConfigurationWrapper configuration, IMessageFactory messageFactory, IMessageQueueFactory messageQueueFactory)
        {
            _tripService = tripService;
            _messageFactory = messageFactory;

            var eventQueueName = configuration.GetConfigValue("TripApplicationEventQueue");
            _eventQueue = messageQueueFactory.CreateQueue(eventQueueName, QueueAccessMode.Send);
            _messageFactory = messageFactory;
        }
 public TripsController(
     ApplicationDbContext data,
     IValidator validator,
     ITripService tripService)
 {
     this.validator   = validator;
     this.data        = data;
     this.tripService = tripService;
 }
Example #22
0
 public ImporterController(ITripService serviceTrip, IDriverService serviceDriver, IVehicleService serviceVehicle, IDriverDutyService serviceDriverDuty, IVehicleDutyService serviceVehicleDuty, IWorkblockService serviceWorkblock)
 {
     _serviceTrip        = serviceTrip;
     _serviceDriver      = serviceDriver;
     _serviceVehicle     = serviceVehicle;
     _serviceDriverDuty  = serviceDriverDuty;
     _serviceVehicleDuty = serviceVehicleDuty;
     _serviceWorkblock   = serviceWorkblock;
 }
        public TripsController(ITripService tripService, IDestinationService destinationService, IMappingService mappingService, IImageService imageService)
            : base(mappingService, imageService)
        {
            Guard.WhenArgument(tripService, "Trip service is null.").IsNull().Throw();
            Guard.WhenArgument(destinationService, "Destination service is null.").IsNull().Throw();

            this.tripService        = tripService;
            this.destinationService = destinationService;
        }
 public TripProcessor(CarTrackerDbContext db, IPlaceService placeService,
                      ITripService tripService, ITripPossiblePlaceService tripPossiblePlaceService,
                      IServerLogger logger)
 {
     this._db                       = db;
     this._placeService             = placeService;
     this._tripService              = tripService;
     this._tripPossiblePlaceService = tripPossiblePlaceService;
     this._logger                   = logger;
 }
Example #25
0
        public AdminController(IReportService reportService, IMappingProvider mappingProvider, ITripService tripService)
        {
            Guard.WhenArgument(reportService, nameof(reportService)).IsNull().Throw();
            Guard.WhenArgument(mappingProvider, nameof(mappingProvider)).IsNull().Throw();
            Guard.WhenArgument(tripService, nameof(tripService)).IsNull().Throw();

            this.reportService   = reportService;
            this.mappingProvider = mappingProvider;
            this.tripService     = tripService;
        }
        public void Throw_ArgumentNullExcetpion_WithMessageContainTripService_WhenTripServiceIsNull()
        {
            // Arrange
            ITripService tripService = null;
            var          mockedUserDashboardService = new Mock <IUserDashboardService>();

            // Act and Assert
            Assert.That(() => new DashboardController(tripService, mockedUserDashboardService.Object),
                        Throws.ArgumentNullException.With.Message.Contain(nameof(tripService)));
        }
Example #27
0
        public TripApplicationController(ITripService tripService, IConfigurationWrapper configuration, IMessageFactory messageFactory, IMessageQueueFactory messageQueueFactory, IUserImpersonationService userImpersonationService) : base(userImpersonationService)
        {
            _tripService    = tripService;
            _messageFactory = messageFactory;

            var eventQueueName = configuration.GetConfigValue("TripApplicationEventQueue");

            _eventQueue     = messageQueueFactory.CreateQueue(eventQueueName, QueueAccessMode.Send);
            _messageFactory = messageFactory;
        }
Example #28
0
        public void ThrowArgumentNullException_WithMessageContainingTirpService_WhenTripServiceIsNull()
        {
            // Arrange
            ITripService tripService           = null;
            var          mockedMappingProvider = new Mock <IMappingProvider>();

            // Act and Assert
            Assert.That(() => new SearchController(tripService, mockedMappingProvider.Object),
                        Throws.ArgumentNullException.With.Message.Contain(nameof(tripService)));
        }
Example #29
0
 public GenerateDataController(ICityService cityService, ICountryService countryService,
                               IUserService userService, IPostService postService, ITripService tripService, IImageService imageService)
 {
     this.cityService    = cityService;
     this.countryService = countryService;
     this.userService    = userService;
     this.postService    = postService;
     this.tripService    = tripService;
     this.imageService   = imageService;
 }
 public AssetsController(
     IAssetService assetService,
     ITrackingPointService pointService,
     ITripService tripService,
     ILoggerFactory loggerFactory)
     : base(loggerFactory)
 {
     this.assetService = assetService.ThrowIfNull(nameof(assetService));
     this.pointService = pointService.ThrowIfNull(nameof(pointService));
     this.tripService  = tripService.ThrowIfNull(nameof(tripService));
 }
 public LogisticsReportModelFactory(
     IBaseAdminModelFactory baseAdminModelFactory,
     ILocalizationService localizationService,
     ITripService tripService,
     IConsignmentOrderService consignmentOrderService)
 {
     this.baseAdminModelFactory   = baseAdminModelFactory;
     this.localizationService     = localizationService;
     this.tripService             = tripService;
     this.consignmentOrderService = consignmentOrderService;
 }
Example #32
0
 public TripController(ITripService tripService, IUserService userService, IOfferService offerService,
                       ICityService cityService, IOrderService orderService, IPostService postService, IImageService imageService)
 {
     _tripService      = tripService;
     _userService      = userService;
     _offerService     = offerService;
     _cityService      = cityService;
     _orderService     = orderService;
     this.postService  = postService;
     this.imageService = imageService;
 }
Example #33
0
 public BuyTicketCommand(
     ICustomerService customers,
     ITripService trips,
     IBankAccountService bankAccount,
     ITicketService tickets)
 {
     this.customers    = customers;
     this.trips        = trips;
     this.bankAccounts = bankAccount;
     this.tickets      = tickets;
 }
        public void ThrowArgumentNullExceptionWithMessageContainingTripService_WhenTripServiceIsNull()
        {
            // Arrange
            var          mockedReportService  = new Mock <IReportService>();
            var          mockedMapingProvider = new Mock <IMappingProvider>();
            ITripService tripService          = null;

            // Act and Assert
            Assert.That(() => new AdminController(mockedReportService.Object, mockedMapingProvider.Object, tripService),
                        Throws.ArgumentNullException.With.Message.Contain(nameof(tripService)));
        }
Example #35
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TripController"/> class.
        /// </summary>
        /// <param name="logger">Logger Service</param>
        /// <param name="tripService">Trip Service</param>
        public TripController(
            ILoggerService logger, 
            ITripService tripService )
            : base(logger)
        {
            if(tripService == null)
            {
                throw new ArgumentNullException("Trip Service, Trip Controller");
            }

            this._tripService = tripService;
        }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (TripService != null)
         {
             TripService = null;
         }
     }
     base.Dispose(disposing);
 }
 public TripsController(ITripService tripService) {
     _tripService = tripService;
 }
 public HomeController(IUserService userService, IChatRoomService chatRoom, ITripService trips)
     : base(userService, chatRoom)
 {
     this.trips = trips;
 }
Example #39
0
 public TripController(ITripService tripService, IPersonService persionService)
 {
     _tripService = tripService;
     _personService = persionService;
 }
 public TripsController(ITripService tripService, IUserService userService, IChatRoomService chatRoomService)
     : base(userService, chatRoomService)
 {
     this.tripService = tripService;
 }
 public VoucherBatchesController(IVoucherBatchService voucherBatchService, ITripService tripService, ICruiseService cruiseService, IVoucherTemplateService voucherTemplateService, IVoucherCodeService voucherCodeService)
 {
     _voucherBatchService = voucherBatchService;
     _tripService = tripService;
     _cruiseService = cruiseService;
     _voucherTemplateService = voucherTemplateService;
     _voucherCodeService = voucherCodeService;
 }
 public CruisesController(ICruiseService cruiseService, ITripService tripService)
 {
     _cruiseService = cruiseService;
     _tripService = tripService;
 }
 public BookingsController(IBookingService bookingService, ITripService tripService, IRoomService roomService)
 {
     _bookingService = bookingService;
     _tripService = tripService;
     _roomService = roomService;
 }