public void MatchesExpectedNumberOfItems(int phoneBookId, int expectedCount) { var spec = new EntryByIdSpecification(phoneBookId); var result = GetTestItemCollection() .AsQueryable() .Where(spec.Criteria); Assert.Equal(expectedCount, result.Count()); }
public async Task <IEnumerable <Entry> > GetAllEntryItems(int entryId) { var spec = new EntryByIdSpecification(entryId); return(await _entryRepository.ListAsync(spec)); }