Exemplo n.º 1
0
        public void TestPriceUpdateWithBulk()
        {
            var item = new SaleItem('A', 1.00, Tuple.Create(6, 3.00));

            item.UpdatePrice(1.00, Tuple.Create(3, 1.00));
            var quantity = 7;

            var expectedPrice = 3.00;
            var actualPrice   = item.PriceAtQuantity(quantity);

            Assert.AreEqual(expectedPrice, actualPrice, delta: expectedPrice / 100);
        }