Beispiel #1
0
        public void Purchase_Product_Valid()
        {
            var cartVM = new CartViewModel();

            cartVM.UserCart = new User
            {
                Username = "******",
                Password = "******",
                Cash     = 10000,
                Admin    = false
            };
            cartVM.PurchasedProducts.Add(product);
            Assert.IsTrue(cartVM.Purchase());
        }
Beispiel #2
0
        public void Purchase_NoProduct()
        {
            var cartVM = new CartViewModel();

            Assert.IsFalse(cartVM.Purchase());
        }