public void TestApplyDiscount()
        {
            IDiscounter target = getTestObject();
            decimal     total  = 100M;

            var discountedTotal = target.ApplyDiscount(total);

            Assert.AreEqual(total * 0.8M, discountedTotal);
        }
Esempio n. 2
0
 public decimal ValueProducts(IEnumerable <Product> products)
 {
     return(m_discounter.ApplyDiscount(products.Sum(p => p.Price)));
 }