Esempio n. 1
0
        public void AddToCart_No_Choice()
        {
            var     catMain = new CatMainModel("AIRBUS");
            Product prod    = null;
            string  test    = catMain.AddToCart(prod);

            Assert.AreEqual(test, "Please select a product first");
        }
Esempio n. 2
0
        public void AddToCart_No_Stock()
        {
            product.Quantity = 0;
            var    catMain = new CatMainModel("AIRBUS");
            string test    = catMain.AddToCart(product);

            Assert.AreEqual(test, "Not enough stock");
        }
Esempio n. 3
0
        public void AddToCart_Pass()
        {
            var catMain = new CatMainModel("AIRBUS");

            Assert.IsNull(catMain.AddToCart(product));
        }