public void ShouldReturn_CartValue130_ForItemA_Quantity3_AfterApplyingPromotion()
        {
            // Arrange
            var itemA = GetCartItemByName("A", 3);

            // Act
            var cart = CreateCart(new List <CartItem>()
            {
                itemA
            });
            var billing = new Billing(cart);

            billing.CalculateCartValue(promotions);

            // Assert
            cart.TotalValue.Should().Be(130);
        }
        public void ShouldReturn_CartValue100_ForItemA_Quantity2()
        {
            // Arrange
            var itemA = GetCartItemByName("A", 2);

            // Act
            var cart = CreateCart(new List <CartItem>()
            {
                itemA
            });
            var billing = new Billing(cart);

            billing.CalculateCartValue();

            // Assert
            cart.TotalValue.Should().Be(100);
        }
        public void ShouldReturn_CartValue80_ForItemsAAndB_Quantity1Each()
        {
            // Arrange
            var itemA = GetCartItemByName("A");
            var itemB = GetCartItemByName("B");

            // Act
            var cart = CreateCart(new List <CartItem>()
            {
                itemA, itemB
            });
            var billing = new Billing(cart);

            billing.CalculateCartValue();

            // Assert
            cart.TotalValue.Should().Be(80);
        }
        public void ShouldReturn_CartValue45_ForItemsCD_Quantity1ForC2ForD_AfterApplyingPromotion()
        {
            // Arrange
            var itemC = GetCartItemByName("C", 1);
            var itemD = GetCartItemByName("D", 2);

            // Act
            var cart = CreateCart(new List <CartItem>()
            {
                itemC, itemD
            });
            var billing = new Billing(cart);

            billing.CalculateCartValue(promotions);

            // Assert
            cart.TotalValue.Should().Be(45);
        }
        public void ShouldReturn_CartValue370_ForItemsABC_AfterApplyingPromotion()
        {
            // Arrange
            var itemA = GetCartItemByName("A", 5);
            var itemB = GetCartItemByName("B", 5);
            var itemC = GetCartItemByName("C", 1);

            // Act
            var cart = CreateCart(new List <CartItem>()
            {
                itemA, itemB, itemC
            });
            var billing = new Billing(cart);

            billing.CalculateCartValue(promotions);

            // Assert
            cart.TotalValue.Should().Be(370);
        }