Example #1
0
        public void AddItemToCart_MutipleCalls_Should_Total()
        {
            var store        = new OnlineStore(new Catalog());
            var customerName = CustomerName;

            store.CreateShoppingCart(customerName);
            store.AddItemToShoppingCart(customerName, ProductTypeEnum.Tent, 3);
            store.AddItemToShoppingCart(customerName, ProductTypeEnum.Tent, 2);
            Assert.AreEqual(5, store.GetItemCountInCart(customerName, ProductTypeEnum.Tent));
            Assert.AreEqual(5 * 50M, store.GetItemInCart(customerName, ProductTypeEnum.Tent).Cost);
        }