public void MatchesExpectedNumberOfItems(bool isDone, int expectedCount) { var spec = new TodoItemFilterSpecification(isDone); var result = GetTestItemCollection().AsQueryable() .Where(spec.Criteria); Assert.Equal(expectedCount, result.Count()); }
/// <summary> /// Returns incomplete todo items /// </summary> /// <returns></returns> public async Task <IEnumerable <TodoItem> > IncompleteItemsAsync() { var isDone = false; var todoItemSpec = new TodoItemFilterSpecification(isDone); var query = await _todoItemRepository.ListAsync(todoItemSpec); return(query); }