コード例 #1
0
        public void InValidProductPrice()
        {
            var shoppingclass = new ShoppingClass();

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

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

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

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