public void CanMatchPredicate()
 {
     IResolveConstraint constraint = new ConstraintExpression().Matches(new Predicate<int>(IsEven));
     Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<predicate>"));
     Assert.That(42, constraint);
 }
 public void CanMatchLambda()
 {
     IResolveConstraint constraint = new ConstraintExpression().Matches<int>( (x) => (x & 1) == 0);
     Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<predicate>"));
     Assert.That(42, constraint);
 }
 public void CanMatchCustomConstraint()
 {
     IResolveConstraint constraint = new ConstraintExpression().Matches(custom);
     Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<custom>"));
 }