public void ScenarioToGetBestMatchOfferOnTheBasisOfSelectedProductAndQuantity()
        {
            //Mention quantity of SKU ID's(Products) in order A,B,C,D
            ShoppingClass obj    = new ShoppingClass();
            double        result = obj.ShoppingCartWithRecommendedPramotion(3, 2, 1, 1);

            Assert.AreEqual(225, result);
        }
        public void ScenarioC()
        {
            //Mention quantity of SKU ID's(Products) in order A,B,C,D
            ShoppingClass obj    = new ShoppingClass();
            double        result = obj.ShoppingCart(3, 5, 1, 1);

            Assert.AreEqual(280, result);
        }
        public void CPlusD()
        {
            //Mention quantity of SKU ID's(Products) in order A,B,C,D
            ShoppingClass obj    = new ShoppingClass();
            double        result = obj.ShoppingCart(0, 0, 1, 1);

            Assert.AreEqual(30, result);
        }
        public void TwoB()
        {
            //Mention quantity of SKU ID's(Products) in order A,B,C,D
            ShoppingClass obj    = new ShoppingClass();
            double        result = obj.ShoppingCart(0, 2, 0, 0);

            Assert.AreEqual(45, result);
        }
Beispiel #5
0
        public void InValidProductPrice()
        {
            var shoppingclass = new ShoppingClass();

            Assert.Throws <ArgumentOutOfRangeException>(() => shoppingclass.Shopping(new Models.Product()
            {
                ProductPrice = 0
            }, DateTime.Now, 1));
        }
Beispiel #6
0
        public void ValidProductAvailabilty()
        {
            var shoppingclass = new ShoppingClass();

            Assert.Throws <ArgumentOutOfRangeException>(() => shoppingclass.Shopping(new Models.Product()
            {
                ProductAvailability = 1
            }, DateTime.Now, 1));
        }
Beispiel #7
0
        public void InValidQuantity()
        {
            var shoppingclass = new ShoppingClass();

            Assert.Throws <ArgumentOutOfRangeException>(() => shoppingclass.Shopping(new Models.Product(), DateTime.Now, -1));
        }
Beispiel #8
0
        public void InVaildTime()
        {
            var shoppingclass = new ShoppingClass();

            Assert.Throws <ArgumentOutOfRangeException>(() => shoppingclass.Shopping(new Models.Product(), DateTime.Now.AddHours(1), 1));
        }