public void DDDMatchesAll() { Expression <Func <Person, bool> > spec = s => s.EntityId != Guid.Empty; ISpecification <Person> AdHocSpecification = new DirectSpecification <Person>(spec); int expected = 1; Person p1 = new Person(); p1.GenerateNewIdentity(); Person p2 = new Person(); Person p3 = new Person(); fpr.Add(p1); fpr.Add(p2); fpr.Add(p3); var result = fpr.AllMatching(AdHocSpecification); Assert.AreEqual(result.Count(), expected, "Criteria error"); }