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); }
public decimal Calculate(Cart shoppingCard) { return(_numberOfProduct.Calculate(shoppingCard) + _numberOfDelivery.Calculate(shoppingCard) + MinDeliveryCost); }