public void TestThatFilterOnNameContainingAReturnsAlexAnnAndMatt() { _param.Search[1] = "a"; _filter = new DatatablePropertyFilter<Person>(_param, _properties); IQueryable<Person> filtered = _filter.Filter(People); Assert.That(filtered, Is.EquivalentTo(new[] {Alex, Ann, Matt})); }
public void TestThatFilterOnNameAlexReturnsAlex() { _param.Search[1] = Alex.Name; _filter = new DatatablePropertyFilter<Person>(_param, _properties); IQueryable<Person> filtered = _filter.Filter(People); Assert.That(filtered, Is.EquivalentTo(new[] {Alex})); }
public void TestThatNoFilterDoesntChangeTheEntities() { _filter = new DatatablePropertyFilter <Person>(_param, _properties); IQueryable <Person> filtered = _filter.Filter(People); Assert.That(filtered, Is.EquivalentTo(People)); }
public void TestThatFilterOnNameContainingAReturnsAlexAnnAndMatt() { _param.Search[1] = "a"; _filter = new DatatablePropertyFilter <Person>(_param, _properties); IQueryable <Person> filtered = _filter.Filter(People); Assert.That(filtered, Is.EquivalentTo(new[] { Alex, Ann, Matt })); }
public void TestThatFilterOnNameAlexReturnsAlex() { _param.Search[1] = Alex.Name; _filter = new DatatablePropertyFilter <Person>(_param, _properties); IQueryable <Person> filtered = _filter.Filter(People); Assert.That(filtered, Is.EquivalentTo(new[] { Alex })); }
public void TestThatNoFilterDoesntChangeTheEntities() { _filter = new DatatablePropertyFilter<Person>(_param, _properties); IQueryable<Person> filtered = _filter.Filter(People); Assert.That(filtered, Is.EquivalentTo(People)); }
/// <summary> /// Applies property-specific filters, if any, to the entities /// </summary> /// <param name="param"> /// The param containing the property filters /// </param> /// <returns> /// the filtered entities /// </returns> private IQueryable <TEntity> FilterSpecific(DatatableParam param) { var filter = new DatatablePropertyFilter <TEntity>(param, _properties); return(filter.Filter(_entities)); }