Example #1
0
        public void TestSpecialOffersAreApplied_OfferNotFullyCovered()
        {
            // Arrange
            var calculator = new CheckoutCalculator();
            var items      = new CheckOutItemCollection();

            items.Add(new CheckoutItem("B", 30));
            items.Add(new CheckoutItem("A", 50));
            var specialOffers = new List <ISpecialOffer>();

            specialOffers.Add(new MultiBuySpecialOffer(2, "B", 45));

            // Act
            decimal total = calculator.Calculate(items, specialOffers);

            // Assert
            Assert.AreEqual(80, total);
        }
Example #2
0
 private string findCheckout(int score)
 {
     // return CheckoutCalculator.Calculate(61);
     return(CheckoutCalculator.Calculate(score));
 }