public void WordServiceTest_GetAllCategories_count() { var expected = rep.GetAllCategories().Count(); var actual = service.GetAllCategories().Count(); Assert.AreEqual(expected, actual); }
public void WordRepositoryTest_Words_getAllCategories() { var countOfCategories = context.Object.Words.GroupBy(x => x.Category).Count(); var rep_countOfAllCategories = rep.GetAllCategories().Count(); Assert.AreEqual(countOfCategories, rep_countOfAllCategories, string.Format(countOfCategories + " != " + rep_countOfAllCategories)); }
public IQueryable <string> GetAllCategories() { return(rep.GetAllCategories()); }