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);
        }
        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);
        }
Beispiel #3
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);
        }
        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);
        }
Beispiel #5
0
 private void Initialize()
 {
     this.context = KeepFitDbContextInMemoryFactory.Initialize();
     this.mapper  = AutoMapperFactory.Initialize();
     this.service = new UsersSerivce(context, mapper);
 }
 private void Initialize()
 {
     this.context = KeepFitDbContextInMemoryFactory.Initialize();
     this.mapper  = AutoMapperFactory.Initialize();
 }