Package org.apache.commons.scxml

Examples of org.apache.commons.scxml.Evaluator


        String[] testCaseName = {ELEvaluatorTest.class.getName()};
        junit.textui.TestRunner.main(testCaseName);
    }

    public void testPristine() throws SCXMLExpressionException {
        Evaluator eval = new ELEvaluator();
        assertNotNull(eval);
        assertTrue(((Boolean) eval.eval(ctx, "${1+1 eq 2}")).booleanValue());
    }
View Full Code Here


        assertNotNull(eval);
        assertTrue(((Boolean) eval.eval(ctx, "${1+1 eq 2}")).booleanValue());
    }

    public void testErrorMessage() {
        Evaluator eval = new ELEvaluator();
        assertNotNull(eval);
        try {
            eval.eval(ctx, BAD_EXPRESSION);
            fail("ELEvaluator should throw SCXMLExpressionException");
        } catch (SCXMLExpressionException e) {
            assertTrue("ELEvaluator: Incorrect error message",
                e.getMessage().startsWith("eval('" + BAD_EXPRESSION + "'):"));
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.scxml.Evaluator

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.