public void AgeGreaterThan26AndLessThan32AndNameContainsUShouldReturnOne() { PersonFilter filter = PersonFilter.And().ForAgeGreaterThan(26).ForAgeLessThan(32).ForNameContains("u"); IEnumerable <Person> people = _repository.GetFilteredPeople(filter); people.Should().NotBeEmpty().And.HaveCount(1); people.Select(person => person.Name).Should().Equal("Susie"); }
public void AgeGreaterThan30ShouldReturnThree() { PersonFilter filter = PersonFilter.And().ForAgeGreaterThan(30); IEnumerable <Person> people = _repository.GetFilteredPeople(filter); people.Should().NotBeEmpty().And.HaveCount(3); people.Select(person => person.Name).Should().Equal("John", "Jake", "Cheryl"); }
public void AgeGreaterThan26AndLessThan32ShouldReturnTwo() { PersonFilter filter = PersonFilter.And().ForAgeGreaterThan(26).ForAgeLessThan(32); IEnumerable <Person> people = _repository.GetFilteredPeople(filter); people.Should().NotBeEmpty().And.HaveCount(2); people.Select(person => person.Name).Should().Equal("Susie", "Sarah"); }
public void NameContainsSShouldReturnThree() { PersonFilter filter = PersonFilter.And().ForNameContains("s"); IEnumerable <Person> people = _repository.GetFilteredPeople(filter); people.Should().NotBeEmpty().And.HaveCount(3); people.Select(person => person.Name).Should().Equal("Susie", "Sarah", "Lindsey"); }