Examples of AbstractTCLNode


Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

*/
public class IdentValueTest extends TestCase
{
    public void testIsStatic() throws Exception
    {
        AbstractTCLNode node = TCLParser.parse("'identifier'");

        assertTrue(node.isStatic());
    }
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

    private void runStaticTypeCheck(String expr, boolean shouldFail) throws Exception
    {
        try
        {
            AbstractTCLNode _root = TCLParser.parse(expr);

            StaticTypeChecker _checker = new StaticTypeChecker();

            _checker.check(_root);
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

     * @throws Exception
     *             if parsing fails
     */
    private void runEvaluation(String expect, String expression) throws Exception
    {
        AbstractTCLNode fstNode = TCLParser.parse(expect);
        AbstractTCLNode sndNode = TCLParser.parse(expression);

        EvaluationContext _context = new EvaluationContext(getEvaluator());

        EvaluationResult pre_res = fstNode.evaluate(_context);
        EvaluationResult pst_res = sndNode.evaluate(_context);

        assertEquals("expected " + fstNode.toStringTree() + " == " + sndNode.toStringTree(),
                pre_res, pst_res);
    }
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

        ETCLComponentName _comp = (ETCLComponentName) TCLParser.parse("$.first_name.last_name");

        _comp.acceptInOrder(new TCLCleanUp());
        assertEquals("$.first_name.last_name", _comp.getComponentName());

        AbstractTCLNode _root = TCLParser.parse("$.first_name.value + 5");

        _root.acceptInOrder(new TCLCleanUp());
        _comp = (ETCLComponentName) _root.getFirstChild();
        assertEquals("$.first_name.value", _comp.getComponentName());

        _comp = (ETCLComponentName) TCLParser.parse("$domain_name");
        _comp.acceptInOrder(new TCLCleanUp());
        assertEquals("$domain_name", _comp.getComponentName());
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

    }

    public void testLTEforwardsVisitorBug() throws Exception
    {
        String _expr = "$.time <= 1";
        AbstractTCLNode _root = TCLParser.parse(_expr);
        _root.acceptPostOrder(new TCLCleanUp());

        ETCLComponentName _n = (ETCLComponentName) _root.left();

        assertEquals("$.time", _n.getComponentName());
    }
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

    public void testAcceptPostOrder() throws Exception
    {
        for (int x = 0; x < visitorTestExpressions_.length; ++x)
        {
            AbstractTCLNode _root = TCLParser.parse(visitorTestExpressions_[x]);
            _root.acceptPostOrder(new TCLCleanUp());
            ETCLComponentName _n = (ETCLComponentName) _root.left();

            assertEquals(visitorTestExpressions_[x] + " failed", "$.value", _n.getComponentName());
        }
    }
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

    public void testAcceptInOrder() throws Exception
    {
        for (int x = 0; x < visitorTestExpressions_.length; ++x)
        {
            AbstractTCLNode _root = TCLParser.parse(visitorTestExpressions_[x]);
            _root.acceptInOrder(new TCLCleanUp());
            ETCLComponentName _n = (ETCLComponentName) _root.left();

            assertEquals(visitorTestExpressions_[x] + " failed", "$.value", _n.getComponentName());
        }
    }
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

    public void testAcceptPreOrder() throws Exception
    {
        for (int x = 0; x < visitorTestExpressions_.length; ++x)
        {
            AbstractTCLNode _root = TCLParser.parse(visitorTestExpressions_[x]);
            _root.acceptPreOrder(new TCLCleanUp());
            ETCLComponentName _n = (ETCLComponentName) _root.left();

            assertEquals(visitorTestExpressions_[x] + " failed", "$.value", _n.getComponentName());
        }
    }
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

        runEvaluation(_event, expr, expect);
    }

    private void runEvaluation(Message event, String expr, String expect) throws Exception
    {
        AbstractTCLNode _root = TCLParser.parse(expr);
        AbstractTCLNode _expect = TCLParser.parse(expect);

        FilterConstraint _evaluator = new ETCLFilterConstraint(_root);
        EvaluationResult _res;
        _root.acceptPostOrder(new TCLCleanUp());

        EvaluationContext _context = new EvaluationContext(getEvaluator());

        _res = _evaluator.evaluate(_context, event);

        assertEquals("expected " + _root.toStringTree() + " == " + _expect.toStringTree(), _expect
                .evaluate(null), _res);
    }
View Full Code Here

Examples of org.jacorb.notification.filter.etcl.AbstractTCLNode

public class IdentValueTest
{
    @Test
    public void testIsStatic() throws Exception
    {
        AbstractTCLNode node = TCLParser.parse("'identifier'");

        assertTrue(node.isStatic());
    }
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.