Example #1
0
        static void Main(string[] args)
        {
            ProductControler controller = new ProductControler();


            //var products = controller.GetProductsWithName("kola");
            //var auctions = Contrl.getAllAucionsForProducts(products.ToArray());
            var products = controller.GetProductsWithName("bike").ToArray();
        }
        public void TestGetProductByName()
        {
            ProductControler ctrl = new ProductControler();
            var pr      = CreateAndAddTestProduct();
            var product = ctrl.GetProductsWithName(pr.Name).FirstOrDefault();

            Assert.AreEqual(pr, product);
            Crepository.RemoveById(pr.CategoryId);
        }