public void CanMatchSingleByCompoundAndSpec() { var spec = new PersonByFirstnameOrLastnameSpecification("Susan", "UniqueLastname"); var result = spec.IsSatisfiedBy(_alsoNotParent); Assert.IsTrue(result); }
public void CanMatchSingleByCompoundOrSpec() { var spec = new PersonByFirstnameOrLastnameSpecification("Johnny", "Bohlen"); var result = spec.IsSatisfiedBy(_parent); Assert.IsTrue(result); }
public void CanFindByCompoundOrSpec() { var spec = new PersonByFirstnameOrLastnameSpecification("Johnny", "Bohlen"); var results = spec.SatisfyingElementsFrom(_people.AsQueryable()); Assert.That(results.ToList(), Has.Member(_parent)); Assert.That(results.ToList(), Has.Member(_child3)); }