コード例 #1
0
        public CartBuilder(ICatalogService catalogService, ICartMapper cartMapper)
        {
            Assert.ArgumentNotNull(catalogService, nameof(catalogService));
            Assert.ArgumentNotNull(cartMapper, nameof(cartMapper));

            this.catalogService = catalogService;
            this.cartMapper     = cartMapper;
        }
コード例 #2
0
        public CartBuilderTests()
        {
            this.fixture = new Fixture().Customize(new OmitOnRecursionCustomization());

            this.catalogService = Substitute.For <ICatalogService>();
            this.cartMapper     = Substitute.For <ICartMapper>();

            this.cartBuilder = new CartBuilder(this.catalogService, this.cartMapper);
        }
コード例 #3
0
        public CartBuilderTests()
        {
            this.fixture = this.CreateOmitOnRecursionFixture();

            this.catalogService = Substitute.For <ICatalogService>();
            this.cartMapper     = Substitute.For <ICartMapper>();

            this.cartBuilder = new CartBuilder(this.catalogService, this.cartMapper);
        }
コード例 #4
0
        public CartManager(
            ILogService <CommonLog> logService,
            IConnectServiceProvider connectServiceProvider,
            ICartMapper cartMapper)
            : base(logService)
        {
            Assert.ArgumentNotNull(connectServiceProvider, nameof(connectServiceProvider));
            Assert.ArgumentNotNull(cartMapper, nameof(cartMapper));

            this.cartServiceProvider = connectServiceProvider.GetCommerceCartServiceProvider();
            this.cartMapper          = cartMapper;
        }