Package org.mule.expression

Examples of org.mule.expression.RegistryExpressionEvaluator.evaluate()


    {

        MuleMessage message = new DefaultMuleMessage(new Apple(), muleContext);
        RegistryExpressionEvaluator eval = new RegistryExpressionEvaluator();
        eval.setMuleContext(muleContext);
        Object o = eval.evaluate("bowlToBasket", message);
        assertNotNull(o);
        assertTrue(o instanceof Transformer);

        o = eval.evaluate("XXbowlToBasket*", message);
        assertNull(o);
View Full Code Here


        eval.setMuleContext(muleContext);
        Object o = eval.evaluate("bowlToBasket", message);
        assertNotNull(o);
        assertTrue(o instanceof Transformer);

        o = eval.evaluate("XXbowlToBasket*", message);
        assertNull(o);


    }

View Full Code Here

    public void testRegistryLookupWithProperties() throws Exception
    {
        MuleMessage message = new DefaultMuleMessage(new Apple(), muleContext);
        RegistryExpressionEvaluator eval = new RegistryExpressionEvaluator();
        eval.setMuleContext(muleContext);
        Object o = eval.evaluate("bowlToBasket.returnClass", message);
        assertNotNull(o);
        assertTrue(o instanceof Class);
        assertEquals(FruitBasket.class, o);

        o = eval.evaluate("XXbowlToBasket*.returnClass", message);
View Full Code Here

        Object o = eval.evaluate("bowlToBasket.returnClass", message);
        assertNotNull(o);
        assertTrue(o instanceof Class);
        assertEquals(FruitBasket.class, o);

        o = eval.evaluate("XXbowlToBasket*.returnClass", message);
        assertNull(o);

        o = eval.evaluate("bowlToBasket.returnClass.name", message);
        assertNotNull(o);
        assertEquals(FruitBasket.class.getName(), o);
View Full Code Here

        assertEquals(FruitBasket.class, o);

        o = eval.evaluate("XXbowlToBasket*.returnClass", message);
        assertNull(o);

        o = eval.evaluate("bowlToBasket.returnClass.name", message);
        assertNotNull(o);
        assertEquals(FruitBasket.class.getName(), o);

        o = eval.evaluate("bowlToBasket.returnClass.xname*", message);
        assertNull(o);
View Full Code Here

        o = eval.evaluate("bowlToBasket.returnClass.name", message);
        assertNotNull(o);
        assertEquals(FruitBasket.class.getName(), o);

        o = eval.evaluate("bowlToBasket.returnClass.xname*", message);
        assertNull(o);

        try
        {
            o = eval.evaluate("bowlToBasket.returnClass.xname", message);
View Full Code Here

        o = eval.evaluate("bowlToBasket.returnClass.xname*", message);
        assertNull(o);

        try
        {
            o = eval.evaluate("bowlToBasket.returnClass.xname", message);
            fail("property xname is not valid and is not optional");
        }
        catch (Exception e)
        {
            //Expected
View Full Code Here

    {

        MuleMessage message = new DefaultMuleMessage(new Apple(), muleContext);
        RegistryExpressionEvaluator eval = new RegistryExpressionEvaluator();
        eval.setMuleContext(muleContext);
        Object o = eval.evaluate("myendpoint.toString", message);
        assertNotNull(o);
        assertTrue(o instanceof String);
        assertEquals("test://foo", o);

        //This doesn't work yet
View Full Code Here

        Apple apple = new Apple();
        muleContext.getRegistry().registerObject("apple", apple);
        MuleMessage message = new DefaultMuleMessage("foo", muleContext);
        RegistryExpressionEvaluator eval = new RegistryExpressionEvaluator();
        eval.setMuleContext(muleContext);
        Object o = eval.evaluate("type:org.mule.tck.testmodels.fruit.Apple", message);
        assertNotNull(o);
        assertEquals(apple, o);


        try
View Full Code Here

        assertEquals(apple, o);


        try
        {
            o = eval.evaluate("banana", message);
            fail("No banana in the registry");
        }
        catch (Exception e)
        {
            //Expected
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.