public void GetSubCategoryTest(int uid, int cid) { userService.GetSubcategoriesByUser(1, 1).Returns(subcat); IEnumerable <subcategory> result = bService.GetSubCategories(uid, cid); Assert.AreEqual(3, result.Count()); }
public IEnumerable <subcategory> Getsubcategory(int userID, int catID) { return(bllService.GetSubCategories(userID, catID).Select(c => new subcategory { subcategoryID = c.subcategoryID, subcategoryName = c.subcategoryName })); }