public AdvertisementController(IAdvertisementService advertisementService, INotificationService notificationService, IUserAdWishlistService userAdWishlistService, UserManager <User> userManager)
 {
     this.userManager           = userManager;
     this.notificationService   = notificationService;
     this.userAdWishlistService = userAdWishlistService;
     this.advertisementService  = advertisementService;
 }
 public ProductsController(IProductsService productService, ICategoriesService categoriesService, Cloudinary cloudinary, UserManager <ApplicationUser> userManager, IUserAdWishlistService wishlistService)
 {
     this._productService    = productService;
     this._categoriesService = categoriesService;
     this.cloudinary         = cloudinary;
     this._userManager       = userManager;
     this._wishlistService   = wishlistService;
 }
Ejemplo n.º 3
0
 public ReportController(UserManager <User> userManager, IReportService reportService, IAdvertisementService advertisementService, INotificationService notificationService, IUserAdWishlistService userAdWishlistService)
 {
     this.userManager           = userManager;
     this.reportService         = reportService;
     this.advertisementService  = advertisementService;
     this.notificationService   = notificationService;
     this.userAdWishlistService = userAdWishlistService;
 }
 public AdvertisementController(IAdvertisementService advertisementService, ICategoryService categoryService, ISubCategoryService subCategoryService, ITownService townService, IUserAdWishlistService userAdWishlistService, UserManager <User> userManager, IConfiguration configuration, INotificationService notificationService, IUserService userService)
 {
     this.advertisementService  = advertisementService;
     this.categoryService       = categoryService;
     this.subCategoryService    = subCategoryService;
     this.townService           = townService;
     this.userManager           = userManager;
     this.userAdWishlistService = userAdWishlistService;
     this.configuration         = configuration;
     this.notificationService   = notificationService;
     this.userService           = userService;
 }
Ejemplo n.º 5
0
 public UserController(
     IAdvertisementService advertisementService,
     IUserAdWishlistService userAdWishlistService,
     ICategoryService categoryService,
     ISubCategoryService subCategoryService,
     ITownService townService,
     UserManager <User> userManager,
     IUserService userService)
 {
     this.advertisementService  = advertisementService;
     this.userAdWishlistService = userAdWishlistService;
     this.categoryService       = categoryService;
     this.subCategoryService    = subCategoryService;
     this.townService           = townService;
     this.userManager           = userManager;
     this.userService           = userService;
 }
Ejemplo n.º 6
0
        public async Task SetUp()
        {
            var options = new DbContextOptionsBuilder <ShoplifyDbContext>()
                          .UseInMemoryDatabase(databaseName: "wishlists")
                          .Options;

            this.context = new ShoplifyDbContext(options);

            await context.Database.EnsureDeletedAsync();

            await context.Database.EnsureCreatedAsync();

            this.service = new UserAdWishlistService(context);

            var moqCloudinaryService = new Mock <ICloudinaryService>();
            var moqIFormFile         = new Mock <IFormFile>();

            this.mockedFile = moqIFormFile.Object;

            moqCloudinaryService.Setup(x => x.UploadPictureAsync(moqIFormFile.Object, "FileName"))
            .ReturnsAsync("http://test.com");

            this.adService = new AdvertisementService(context, moqCloudinaryService.Object);
        }
Ejemplo n.º 7
0
 public WishListsController(IUserAdWishlistService wishlistService, IProductsService productService)
 {
     this._wishlistService = wishlistService;
     this.productService   = productService;
 }
Ejemplo n.º 8
0
 public UserController(IUserAdWishlistService wishlistService, IProductsService productsService, UserManager <ApplicationUser> userManager)
 {
     this._wishlistService = wishlistService;
     this._productsService = productsService;
     this._userManager     = userManager;
 }