Esempio n. 1
0
        public void Delivery_Should_Calculate()
        {
            var delivery = new Delivery(1, 1, 1);
            var cart     = new Cart();

            cart.AddProduct(new Product("testProduct", 1, new Category("testCategory")), 1);
            Assert.Equal(3, delivery.Calculate(cart));
        }
Esempio n. 2
0
        public double GetDeliveryCost()
        {
            var delivery = new Delivery(5, 1, 3);

            var deliveryAmount = delivery.Calculate(this);

            return(deliveryAmount);
        }