Example #1
0
        public void GetNMyProductsFromCategoryTest()
        {
            MyProductsRepository repo   = new MyProductsRepository();
            List <MyProduct>     result = repo.GetNMyProductsFromCategory("Bikes", 2);

            Assert.AreEqual(97, result.Count);
        }
Example #2
0
        public void GetNRecentlyReviewdMyProducts()
        {
            MyProductsRepository repo   = new MyProductsRepository();
            List <MyProduct>     result = repo.GetNRecentlyReviewedProductd(3);

            Assert.AreEqual(3, result.Count);
        }
Example #3
0
        public void GetMyProductsByNameTest()
        {
            MyProductsRepository repo   = new MyProductsRepository();
            List <MyProduct>     result = repo.GetMyProductsByName("Chain");

            Assert.AreEqual(5, result.Count);
            foreach (MyProduct res in result)
            {
                Assert.IsTrue(res.Name.Contains("Chain"));
            }
        }