Beispiel #1
0
        public UnitTestsCartService()
        {
            _repository            = new MockCartRepository();
            _mockProductRepository = new MockProductRepository();
            IProductService _productService = new ProductService(_mockProductRepository);

            _cartService = new CartService(_repository, _productService);
        }
 public UnitTestsCartController()
 {
     _productRepository = new MockProductRepository();
     _productService    = new ProductService(_productRepository);
     _cartRepository    = new MockCartRepository();
     _cartService       = new CartService(_cartRepository, _productService);
     _controller        = new CartController(_productService, _cartService);
 }
Beispiel #3
0
 public UnitTestsProductService()
 {
     _repository     = new MockProductRepository();
     _productService = new ProductService(_repository);
 }