コード例 #1
0
        private void Initialize()
        {
            this.context      = KeepFitDbContextInMemoryFactory.Initialize();
            this.mapper       = AutoMapperFactory.Initialize();
            this.myCloudinary = new Mock <IMyCloudinary>();

            this.myCloudinary.Setup(x => x.UploadImage(this.image))
            .Returns("url");

            this.service = new ProductsService(context, mapper, myCloudinary.Object);
        }
コード例 #2
0
        private void Initialize()
        {
            this.context = KeepFitDbContextInMemoryFactory.Initialize();
            this.mapper  = AutoMapperFactory.Initialize();

            var productService = new Mock <IProductsService>();

            productService.Setup(x => x.GetProductByIdAsync <ProductViewModel>(ProductId))
            .Returns(Task.FromResult(GetMockedViewModel()));

            this.service = new ReviewsService(context, productService.Object, mapper);
        }
コード例 #3
0
        private void Initialize()
        {
            this.context      = KeepFitDbContextInMemoryFactory.Initialize();
            this.mapper       = AutoMapperFactory.Initialize();
            this.myCloudinary = new Mock <IMyCloudinary>();
            //this.formFile = new Mock<IFormFile>();

            this.myCloudinary.Setup(x => x.UploadImage(this.image))
            .Returns(Url);

            this.service = new JobApplicantService(context, mapper, myCloudinary.Object);
        }
コード例 #4
0
        private void Initialize()
        {
            this.context = KeepFitDbContextInMemoryFactory.Initialize();
            this.mapper  = AutoMapperFactory.Initialize();
            var basketService = new Mock <IBasketService>();

            basketService.Setup(x => x.GetBasketTotalPriceAsync(UserOneName))
            .Returns(Task.FromResult(OrderTotalPrice));

            this.service = new OrdersService(
                context,
                basketService.Object,
                mapper);
        }
コード例 #5
0
 private void Initialize()
 {
     this.context = KeepFitDbContextInMemoryFactory.Initialize();
     this.mapper  = AutoMapperFactory.Initialize();
 }
コード例 #6
0
 public AddressService(KeepFitDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
コード例 #7
0
 public ReviewsService(KeepFitDbContext context, IProductsService productsService, IMapper mapper)
 {
     this.context         = context;
     this.productsService = productsService;
     this.mapper          = mapper;
 }
コード例 #8
0
 public JobApplicantService(KeepFitDbContext context, IMapper mapper, IMyCloudinary cloudinary)
 {
     this.context    = context;
     this.mapper     = mapper;
     this.cloudinary = cloudinary;
 }
コード例 #9
0
 public UsersSerivce(KeepFitDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
コード例 #10
0
 public PaymentService(KeepFitDbContext context)
 {
     this.context = context;
 }
コード例 #11
0
 public CreatinesService(KeepFitDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
コード例 #12
0
 public ProductsService(KeepFitDbContext context, IMapper mapper, IMyCloudinary cloudinary)
 {
     this.context    = context;
     this.mapper     = mapper;
     this.cloudinary = cloudinary;
 }
コード例 #13
0
 public JobPositionService(KeepFitDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
コード例 #14
0
 public ProteinsService(KeepFitDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
コード例 #15
0
 public OrdersService(KeepFitDbContext context, IBasketService basketService, IMapper mapper)
 {
     this.context       = context;
     this.basketService = basketService;
     this.mapper        = mapper;
 }
コード例 #16
0
 private void Initialize()
 {
     this.context = KeepFitDbContextInMemoryFactory.Initialize();
     this.mapper  = AutoMapperFactory.Initialize();
     this.service = new UsersSerivce(context, mapper);
 }
コード例 #17
0
 public FavoriteService(KeepFitDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }