Package org.springframework.rules.constraint.property

Examples of org.springframework.rules.constraint.property.ParameterizedPropertyConstraint.test()


    assertFalse(p.test(new TestBean()));
  }

  public void testParameterizedBeanPropertyExpression() {
    ParameterizedPropertyConstraint p = new ParameterizedPropertyConstraint("test", EqualTo.instance(), "testValue");
    assertTrue(p.test(new TestBean()));

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


  public void testParameterizedBeanPropertyExpression() {
    ParameterizedPropertyConstraint p = new ParameterizedPropertyConstraint("test", EqualTo.instance(), "testValue");
    assertTrue(p.test(new TestBean()));

    p = new ParameterizedPropertyConstraint("test", EqualTo.instance(), "test2Value");
    assertFalse(p.test(new TestBean()));
  }

  public void testNoRules() {
    Rules r = new Rules(TestBean.class);
    assertTrue(r.test(new TestBean()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.