public void SentenceTaskRepositoryTest_SentenceTasks_getByCategory()
        {
            var count     = context.Object.SentenceTasks.GroupBy(x => x.Category).Where(x => x.Key.Equals("Category2")).Count();
            var rep_count = rep.GetByCategory("Category2").Count();

            Assert.AreEqual(count, rep_count, string.Format(count + " != " + rep_count));
        }
        public void SentenceTaskServiceTest_GetByCategory_valid()
        {
            var expected = rep.GetByCategory("Category1").Count();
            var actual   = service.GetByCategory("Category1").Count();

            Assert.AreEqual(expected, actual);
        }
 public IQueryable <SentenceTask> GetByCategory(string category)
 {
     if (String.IsNullOrEmpty(category))
     {
         throw new Exception("Invalid model");
     }
     return(rep.GetByCategory(category));
 }