public void GetProducts() { SubCategory subcategory = new SubCategory() { CategoryId = 1, SubCategoryId = 2, SubCategoryName = "BottomWear" }; var result = searchcontroller.GetProducts(subcategory); Assert.AreEqual(1, result.Count); }
public void ProductTestMethod() { Subcategory pro = new Subcategory() { CategoryId = 100, SubCategoryId = 100 }; var result = controller.GetProducts(pro); Assert.IsInstanceOfType(result, typeof(OkObjectResult)); }