示例#1
0
        public void Calculate_tests()
        {
            INumberOfProduct numberOfProduct = Resolve <INumberOfProduct>();

            var cart = new Cart
            {
                ProductTransactions = new List <ProductTransaction>
                {
                    new ProductTransaction(),
                    new ProductTransaction(),
                    new ProductTransaction(),
                },
            };

            var productCount = numberOfProduct.Calculate(cart);

            Assert.Equal(3, productCount);
        }
示例#2
0
        } = 5;                                            // varsayılan taban 5tl teslimat ücreti

        public DeliveryCostAggregate(INumberOfProduct numberOfProduct, INumberOfDelivery numberOfDelivery)
        {
            _numberOfDelivery = numberOfDelivery;
            _numberOfProduct  = numberOfProduct;
        }