Exemplo n.º 1
0
        public void GetNProductsFromCategory_ShouldReturnProperValues()
        {
            var categoryName   = "Accessories";
            var productAmounts = 5;
            var products       = DM.GetNProductsFromCategory(categoryName, productAmounts);

            Assert.AreEqual(products.Count, productAmounts);
        }
Exemplo n.º 2
0
        public void GetPagedExtensionMethod()
        {
            var categoryName   = "Accessories";
            var productAmounts = 10;
            var products       = DM.GetNProductsFromCategory(categoryName, productAmounts);
            var page           = products.GetPaged(3, 2);

            Assert.AreEqual(page.Count, 3);
        }
Exemplo n.º 3
0
        public void GetProductsAndTheirVendors()
        {
            var categoryName   = "Accessories";
            var productAmounts = 2;
            var products       = DM.GetNProductsFromCategory(categoryName, productAmounts); // helper
            var report         = products.GetProductsAndTheirVendors();

            foreach (var p in products)
            {
                Assert.IsTrue(report.Contains(p.Name));
            }
        }