Esempio n. 1
0
        public void GetTotalStandardCostByCategoryTest()
        {
            ProductCategory pc = new ProductCategory
            {
                Name = "Bikes"
            };

            Assert.AreEqual(92092.8230m, MethodSyntaxMethods.GetTotalStandardCostByCategory(pc));
        }
Esempio n. 2
0
        public void GetProductByNameTest()
        {
            List <Product> result = MethodSyntaxMethods.GetProductsByName("Chain");

            Assert.AreEqual(5, result.Count);
            foreach (Product res in result)
            {
                Assert.IsTrue(res.Name.Contains("Chain"));
            }
        }
Esempio n. 3
0
        public void GetNProductsFromCategoryTest()
        {
            List <Product> result = MethodSyntaxMethods.GetNProductsFromCategory("Bikes", 5);

            Assert.AreEqual(5, result.Count);
        }
Esempio n. 4
0
        public void GetNRecentlyReviewdProductdTest()
        {
            List <Product> result = MethodSyntaxMethods.GetNRecentlyReviewedProductd(3);

            Assert.AreEqual(3, result.Count);
        }
Esempio n. 5
0
        public void GetProductsWithRecentReviewsTest()
        {
            List <Product> result = MethodSyntaxMethods.GetProductsWithRecentReviews(3);

            Assert.AreEqual(3, result.Count);
        }
Esempio n. 6
0
        public void GetProduvtVendorByProductNameTest()
        {
            string result = MethodSyntaxMethods.GetProductVendorByProductName("Chain");

            Assert.AreEqual("Varsity Sport Co.", result);
        }
Esempio n. 7
0
        public void GetProductNameByVendorNameTest()
        {
            List <string> result = MethodSyntaxMethods.GetProtuctNamesByVendorName("International");

            Assert.AreEqual(1, result.Count);
        }