Package org.drools.factconstraints.server.predefined

Examples of org.drools.factconstraints.server.predefined.IntegerConstraint.validate()


    @Test
    public void testValidConstraint() {
      Constraint cons = new IntegerConstraint();
     
        ValidationResult result = cons.validate(12, conf);
        assertTrue(result.isSuccess());

        result = cons.validate(new Integer("12"), conf);
        assertTrue(result.isSuccess());
View Full Code Here


      Constraint cons = new IntegerConstraint();
     
        ValidationResult result = cons.validate(12, conf);
        assertTrue(result.isSuccess());

        result = cons.validate(new Integer("12"), conf);
        assertTrue(result.isSuccess());

        result = cons.validate("12", conf);
        assertTrue(result.isSuccess());
View Full Code Here

        assertTrue(result.isSuccess());

        result = cons.validate(new Integer("12"), conf);
        assertTrue(result.isSuccess());

        result = cons.validate("12", conf);
        assertTrue(result.isSuccess());

    }

    @Test
View Full Code Here

    @Test
    public void testInvalidConstraint() {
      Constraint cons = new IntegerConstraint();
     
        ValidationResult result = cons.validate(new Object(), conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate("", conf);
        assertFalse(result.isSuccess());
View Full Code Here

     
        ValidationResult result = cons.validate(new Object(), conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate("", conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate("ABC", conf);
        assertFalse(result.isSuccess());
View Full Code Here

        result = cons.validate("", conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate("ABC", conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(null, conf);
        assertFalse(result.isSuccess());
View Full Code Here

        result = cons.validate("ABC", conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(null, conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(new Long("12"), conf);
        assertFalse(result.isSuccess());
View Full Code Here

        result = cons.validate(null, conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(new Long("12"), conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(12L, conf);
        assertFalse(result.isSuccess());
View Full Code Here

        result = cons.validate(new Long("12"), conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(12L, conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(12.8, conf);
        assertFalse(result.isSuccess());
View Full Code Here

        result = cons.validate(12L, conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());

        result = cons.validate(12.8, conf);
        assertFalse(result.isSuccess());
        System.out.println("Message: " + result.getMessage());
    }

    @Test
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.