public void FilterShouldReturnSourceIfNoFilterFunctionsSpecifiedInFilteringRules() { _filterModel.Age = 3; var emptySut = new QueryFilterService <TestSequence>(new EmptyTestFilterRules()); var result = emptySut.Filter(_sequence, _filterModel, true); Assert.AreEqual(_sequence.Count(), result.Count()); }
public void Setup() { _sequence = new List <TestSequence> { new TestSequence { Age = 3, Name = "O" }, new TestSequence { Age = 5, Name = "O" }, new TestSequence { Age = 3, Name = "A", ProfessionDescription = new ProfessionDescription { Name = "plumber" } } }.AsQueryable(); _filter = new TestFilterRules(); _filterModel = new TestFilter(); _filteringRules = new TestFilterRules(); _sortModel = new TestSortModel(); _sut = new QueryFilterService <TestSequence>(_filteringRules); }