public TripsServiceTests()
        {
            var services = new ServiceCollection();

            services.AddDbContext <MbDbContext>(opt =>
                                                opt.UseInMemoryDatabase(Guid.NewGuid().ToString()));
            services.AddScoped <ITripsService, TripsService>();
            services.AddScoped <IMonumentsService, MonumentsService>();
            services.AddScoped <IUsersService, UsersService>();
            services.AddScoped <IHotelsService, HotelsService>();
            services.AddScoped <IOblastsService, OblastsService>();

            Mapper.Reset();
            Mapper.Initialize(config => config.AddProfile(typeof(TripsProfile)));
            services.AddScoped <IMapper>(service => Mapper.Instance);

            var account = new Account(GlobalConstants.CloudinaryName,
                                      GlobalConstants.CloudinaryKey, GlobalConstants.CloudinarySecret);

            services.AddScoped(x => new Cloudinary(account));
            services.AddScoped <ImagesUploader>();

            this.provider     = services.BuildServiceProvider();
            this.dbContext    = this.provider.GetService <MbDbContext>();
            this.tripsService = this.provider.GetService <ITripsService>();
        }
Exemplo n.º 2
0
 public MyTripsViewModel(
     ITripsService tripsService,
     CurrentDealStatusViewModel currentDealStatusViewModel)
 {
     _tripsService = tripsService;
     _currentDealStatusViewModel = currentDealStatusViewModel;
 }
Exemplo n.º 3
0
 public ConfirmationViewModel(
     IAuthenticationService authenticationService,
     ITripsService tripsService)
 {
     _authenticationService = authenticationService;
     _tripsService          = tripsService;
 }
Exemplo n.º 4
0
 public FishSpeciesService(
     IDeletableEntityRepository <FishSpecies> fishSpeciesRepository,
     ITripsService tripsService)
 {
     this.fishSpeciesRepository = fishSpeciesRepository;
     this.tripsService          = tripsService;
 }
Exemplo n.º 5
0
 public TripsController(ApplicationDbContext data, IValidator validator,
                        ITripsService tripsService)
 {
     this.data         = data;
     this.validator    = validator;
     this.tripsService = tripsService;
 }
Exemplo n.º 6
0
 public DashboardController(ITripsService tripsService, IEventsService eventsService, UserManager <ApplicationUser> userManager, IUsersService usersService)
 {
     this.tripsService  = tripsService;
     this.eventsService = eventsService;
     this.userManager   = userManager;
     this.usersService  = usersService;
 }
Exemplo n.º 7
0
 public TripsController(
     ITripsService tripService,
     UserManager <ApplicationUser> userManager)
 {
     this.tripService = tripService;
     this.userManager = userManager;
 }
Exemplo n.º 8
0
 public AuthenticationService(
     IBrowserCookiesService browserCookiesService,
     ITripsService tripsService)
 {
     _browserCookiesService = browserCookiesService;
     _tripsService          = tripsService;
 }
Exemplo n.º 9
0
 public HomeController(
     IDestinationService destinationsService,
     ITripsService tripsService)
 {
     this.destinationsService = destinationsService;
     this.tripsService        = tripsService;
 }
 public TicketsController(ITicketsService ticketsService, ITripsService tripsService, IDiscountsService discountsService, UserManager <User> userManager)
 {
     this._ticketsService   = ticketsService;
     this._tripsService     = tripsService;
     this._discountsService = discountsService;
     this._userManager      = userManager;
 }
Exemplo n.º 11
0
        public HomeController(ITripsService trips, ICacheService cacheService)
        {
            Guard.ThrowIfNull(trips, "Trips service");
            Guard.ThrowIfNull(cacheService, "HTTP cache service");

            this.trips        = trips;
            this.cacheService = cacheService;
        }
Exemplo n.º 12
0
        public TripController(ITripsService trips, IMapper mapper)
        {
            Guard.ThrowIfNull(trips, "Trips");
            Guard.ThrowIfNull(mapper, "Mapper");

            this.trips  = trips;
            this.mapper = mapper;
        }
Exemplo n.º 13
0
 public TripsController(
     ITripsService tripsService,
     IConfiguration configuration)
 {
     this.tripsService    = tripsService;
     this.configuration   = configuration;
     this.imagePathPrefix = string.Format(this.cloudinaryPrefix, this.configuration["Cloudinary:AppName"]);
 }
Exemplo n.º 14
0
 public TripsController(
     ITripsService tripsService,
     IUsersService usersService,
     IRequestsService requestsService)
 {
     _tripsService = tripsService;
     _usersService = usersService;
     _requestsService = requestsService;
 }
Exemplo n.º 15
0
 public NotificationsController(
     ITripsService tripsService,
     INotificationsService notificationsService,
     UserManager <ApplicationUser> userManager)
 {
     this.tripsService         = tripsService;
     this.notificationsService = notificationsService;
     this.userManager          = userManager;
 }
Exemplo n.º 16
0
 public WatchListTripsService(
     IDeletableEntityRepository <WatchListTrip> watchListRepository,
     IRepository <ApplicationUser> usersRepository,
     ITripsService tripsService)
 {
     this.watchListRepository = watchListRepository;
     this.usersRepository     = usersRepository;
     this.tripsService        = tripsService;
 }
 public PushNotificationService(
     INavigationService navigationService,
     IRequestProvider requestProvider,
     ITripsService tripsService)
 {
     _navigationService = navigationService;
     _requestProvider   = requestProvider;
     _tripsService      = tripsService;
 }
Exemplo n.º 18
0
 public DashboardController(
     IUsersService usersService,
     ICarsService carsService,
     ITripsService tripsService)
 {
     this.usersService = usersService;
     this.carsService  = carsService;
     this.tripsService = tripsService;
 }
Exemplo n.º 19
0
 public TripsController(IMonumentsService monumentsService,
                        IHotelsService hotelsService,
                        ITripsService tripsService,
                        IMapper mapper)
 {
     this.monumentsService = monumentsService;
     this.hotelsService    = hotelsService;
     this.tripsService     = tripsService;
     this.mapper           = mapper;
 }
Exemplo n.º 20
0
 public ViewsService(
     IRepository <Trip> tripsRepository,
     ITripsService tripsService,
     IRepository <View> viewsRepository
     )
 {
     this.tripsRepository = tripsRepository;
     this.tripsService    = tripsService;
     this.viewsRepository = viewsRepository;
 }
Exemplo n.º 21
0
 public HomeController(
     ApplicationDbContext db,
     Cloudinary cloudinary,
     ICloudinaryService cloudinaryService,
     ITripsService tripsService)
 {
     this.db                = db;
     this.cloudinary        = cloudinary;
     this.cloudinaryService = cloudinaryService;
     this.tripsService      = tripsService;
 }
Exemplo n.º 22
0
 public NotificationsService(
     IDeletableEntityRepository <Notification> notificationsRepository,
     IRepository <ApplicationUser> usersRepository,
     IUsersService usersService,
     ITripsService tripsService)
 {
     this.notificationsRepository = notificationsRepository;
     this.usersRepository         = usersRepository;
     this.usersService            = usersService;
     this.tripsService            = tripsService;
 }
Exemplo n.º 23
0
 public TripDetailsController(
     ITripsService tripsService,
     ICitiesService citiesService,
     ICragsService cragsService,
     ISectorsService sectorsService)
 {
     this.tripsService   = tripsService;
     this.citiesService  = citiesService;
     this.cragsService   = cragsService;
     this.sectorsService = sectorsService;
 }
 public CarsRatingsController(
     ICarsRatingsService carsRatingsService,
     ITripsService tripsService,
     ICarsService carsService,
     UserManager <ApplicationUser> userManager)
 {
     this.carsRatingsService = carsRatingsService;
     this.tripsService       = tripsService;
     this.carsService        = carsService;
     this.userManager        = userManager;
 }
Exemplo n.º 25
0
 public TripsController(
     UserManager <ApplicationUser> userManager,
     ITripsService tripsService,
     ICarsService carsService,
     IConfiguration configuration)
 {
     this.userManager     = userManager;
     this.tripsService    = tripsService;
     this.carsService     = carsService;
     this.configuration   = configuration;
     this.imagePathPrefix = string.Format(this.cloudinaryPrefix, this.configuration["Cloudinary:AppName"]);
 }
Exemplo n.º 26
0
 public TripsController(
     ICarsService carsService,
     ITripsService tripsService,
     IUsersService usersService,
     IReservationsService reservationsService,
     UserManager <ApplicationUser> userManager)
 {
     this.carsService         = carsService;
     this.tripsService        = tripsService;
     this.usersService        = usersService;
     this.reservationsService = reservationsService;
     this.userManager         = userManager;
 }
Exemplo n.º 27
0
 public UsersController(
     UserManager <ApplicationUser> userManager,
     IWebHostEnvironment environment,
     IMailService mailService,
     IEventsService eventsService,
     ITripsService tripsService)
 {
     this.userManager   = userManager;
     this.environment   = environment;
     this.mailService   = mailService;
     this.eventsService = eventsService;
     this.tripsService  = tripsService;
 }
Exemplo n.º 28
0
 public TripsController(
     ITripsService tripsService,
     ICarsService carsService,
     IViewService viewsService,
     ITripRequestsService tripRequestsService,
     IDestinationService destinationService,
     UserManager <ApplicationUser> userManager)
 {
     this.tripsService        = tripsService;
     this.carsService         = carsService;
     this.viewsService        = viewsService;
     this.tripRequestsService = tripRequestsService;
     this.destinationsService = destinationService;
     this.userManager         = userManager;
 }
Exemplo n.º 29
0
 public RegisterModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender,
     ICartsService cartsServices,
     ITripsService tripsServices,
     ApplicationDbContext db)
 {
     this.userManager   = userManager;
     this.signInManager = signInManager;
     this.logger        = logger;
     this.emailSender   = emailSender;
     this.cartsServices = cartsServices;
     this.db            = db;
 }
Exemplo n.º 30
0
 public TripsController(
     ICitiesService citiesService,
     ICountriesService countryService,
     ICategoriesService categoriesService,
     ITransportService transportService,
     ITripsService tripsService,
     UserManager <ApplicationUser> userManager,
     IWebHostEnvironment environment,
     IRatingsService ratingsService)
 {
     this.citiesService     = citiesService;
     this.categoriesService = categoriesService;
     this.tripsService      = tripsService;
     this.userManager       = userManager;
     this.environment       = environment;
 }
Exemplo n.º 31
0
        public HomeController(
            IUserService users,
            ITripsService trips,
            ICommentsService comments,
            ApplicationUserManager userManager)
        {
            Guard.ThrowIfNull(users, "Users service");
            Guard.ThrowIfNull(trips, "Trips service");
            Guard.ThrowIfNull(comments, "Comments service");
            Guard.ThrowIfNull(userManager, "User manager");

            this.users       = users;
            this.trips       = trips;
            this.comments    = comments;
            this.UserManager = userManager;
        }
Exemplo n.º 32
0
 public TripsGridController(ITripsService trips, ILocationsService locations)
 {
     this.trips = trips;
     this.locations = locations;
 }
Exemplo n.º 33
0
 public MyTripsController(ITripsService trips)
 {
     this.trips = trips;
 }
Exemplo n.º 34
0
 public EditController(IUsersService users, ITripsService trips, ILocationsService locations)
 {
     this.users = users;
     this.trips = trips;
     this.locations = locations;
 }
Exemplo n.º 35
0
 public TripsController(ITripsService trips, IUsersService users)
 {
     this.trips = trips;
     this.users = users;
 }
Exemplo n.º 36
0
 public CreateTripController(ITripsService trips, ILocationsService locations)
 {
     this.trips = trips;
     this.locations = locations;
 }