public void Filter(string nameFilter) { var repository = new SiteRepository(_dbContext, _cache.Object, _logger.Object); var pagedItems = repository.Filter(1, 20, new OrderBySelector <Site, string>(OrderByType.Ascending, f => f.Name), f => f.Name.Contains(nameFilter)); Assert.NotEmpty(pagedItems.Items); Assert.True(pagedItems.Items.TrueForAll(f => f.Name.Contains(nameFilter))); }