Package org.springframework.rules.constraint.property

Examples of org.springframework.rules.constraint.property.PropertiesConstraint


    public PropertyConstraint lte(String propertyName, Comparable propertyValue) {
        return new ParameterizedPropertyConstraint(propertyName, lte(propertyValue));
    }

    public PropertyConstraint valueProperties(String propertyName, BinaryConstraint constraint, String otherPropertyName) {
        return new PropertiesConstraint(propertyName, constraint, otherPropertyName);
    }
View Full Code Here


    p.add(constraints.maxLength(3));
    assertFalse(e.test(new TestBean()));
  }

  public void testBeanPropertiesExpression() {
    PropertiesConstraint p = new PropertiesConstraint("test", EqualTo.instance(), "confirmTest");
    assertTrue(p.test(new TestBean()));

    p = new PropertiesConstraint("test", EqualTo.instance(), "min");
    assertFalse(p.test(new TestBean()));
  }
View Full Code Here

TOP

Related Classes of org.springframework.rules.constraint.property.PropertiesConstraint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.