public void testMethodInvokingRule() {
TestBean b = new TestBean();
Constraint p = constraints.method(b, "isTooMuch", "max");
assertTrue(p.test(new Integer(26)));
assertFalse(p.test(new Integer(25)));
}
public void testRegExpConstraint() {
Constraint p = constraints.regexp("a*b");
assertTrue(p.test("aaaaab"));