Exemple #1
0
        public void Total_AfterIncrement_ReturnsUnitPrice()
        {
            var saleItem = new SaleItem(new Product("A", 1));

            saleItem.Increment();

            Assert.Equal(2, saleItem.GetPrice().Total);
        }
Exemple #2
0
        public void Total_WithVolumeDiscount_ReturnsVolumePrice()
        {
            var saleItem = new SaleItem(new Product("A", 1, new VolumeDiscount(2, 3)));

            saleItem.Increment();
            saleItem.Increment();

            Assert.Equal(2, saleItem.GetPrice().Total);
        }
Exemple #3
0
        public void Total_SingleItem_ReturnsUnitPrice()
        {
            var saleItem = new SaleItem(new Product("A", 1));

            Assert.Equal(1, saleItem.GetPrice().Total);
        }