public void ClearShoppingCartLineItemsTest()
        {
            var product  = TestHelper.GetTestProduct();
            var product2 = TestHelper.GetTestProduct();
            var account  = TestHelper.GetTestAccount();
            var service  = new ShoppingCartService();
            var cart     = service.GetShoppingCart(account);

            service.AddShoppingCartLineItem(cart, product, product.ProductVariants.First().Name);
            service.AddShoppingCartLineItem(cart, product2, product2.ProductVariants.First().Name);
            service.ClearShoppingCartLineItems(cart);
            Assert.IsTrue(cart.LineItems.Count == 0, "Shopping cart items not removed");
        }
        public void RemoveShoppingCartLineItemTest()
        {
            var product = TestHelper.GetTestProduct();
            var account = TestHelper.GetTestAccount();
            var service = new ShoppingCartService();
            var cart    = service.GetShoppingCart(account);

            service.AddShoppingCartLineItem(cart, product, product.ProductVariants.First().Name);
            service.RemoveShoppingCartLineItem(cart, cart.LineItems.First());
            Assert.IsTrue(cart.LineItems.Count == 0);
        }
        public void AddShoppingCartLineItemTest()
        {
            var product = TestHelper.GetTestProduct();
            var account = TestHelper.GetTestAccount();
            var service = new ShoppingCartService();
            var cart    = service.GetShoppingCart(account);

            service.AddShoppingCartLineItem(cart, product, product.ProductVariants.First().Name);
            Assert.IsTrue(cart.LineItems.Count == 1, "Product not added");
            Assert.IsTrue(cart.LineItems.First().Quantity == 1, "Quantity is not equal to 1");
            Assert.IsTrue(cart.LineItems.First().ProductName == product.Name, "Product name does not match");
            Assert.IsTrue(cart.LineItems.First().ProductVariantName == product.ProductVariants.First().Name, "Product Variant name does not match");
            Assert.IsTrue(cart.LineItems.First().UnitPrice == product.ProductVariants.First().Price, "Product variant price does not match");
        }