Package org.mule.tck.testmodels.fruit

Examples of org.mule.tck.testmodels.fruit.FruitBowl


        Flow flow = (Flow) muleContext.getRegistry().lookupFlowConstruct("et");
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("foo", "moo");
        props.put("bar", "mar");

        MuleMessage message = new DefaultMuleMessage(new FruitBowl(new Apple(), new Banana()), props,
            muleContext);

        MuleEvent resultEvent = flow.process(new DefaultMuleEvent(message, getTestInboundEndpoint(""),
            getTestService(), getTestSession(null, muleContext)));
        assertNotNull(resultEvent);
View Full Code Here


    {
        ExpressionTransformer transformer = (ExpressionTransformer) muleContext.getRegistry().lookupTransformer("testTransformer2");
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("foo", "moo");

        MuleMessage message = new DefaultMuleMessage(new FruitBowl(new Apple(), new Banana()), props, muleContext);

        transformer.transform(message);
        fail("Not all headers present, the transform should have failed");
    }
View Full Code Here

//<end id="lis_13_transformer"/>

//<start id="lis_13_transformer-sourcetypes"/>
@Transformer(sourceTypes = { Apple.class, Banana.class })
public static FruitBowl transformFruitToBowl(@Payload Fruit payload) {
  FruitBowl bowl = new FruitBowl();
  bowl.addFruit(payload);
  return bowl;
}
View Full Code Here

    }
   
    @Test
    public void testNonMapNonJsonPayload() throws Exception
    {
        FruitBowl payload = new FruitBowl(new Apple(), new Banana());
        MuleMessageFactory factory = createMuleMessageFactory();
        MuleMessage message = factory.create(payload, encoding, muleContext);
        assertNotNull(message);
        assertEquals(payload, message.getPayload());
    }
View Full Code Here

    @Test
    public void testBean()
    {
        Apple apple = new Apple();
        apple.wash();
        FruitBowl payload = new FruitBowl(apple, new Banana());
        DefaultMuleMessage msg = new DefaultMuleMessage(payload, muleContext);

        JXPathExpressionEvaluator e = new JXPathExpressionEvaluator();
        Object value = e.evaluate("apple/washed", msg);
        assertNotNull(value);
View Full Code Here

TOP

Related Classes of org.mule.tck.testmodels.fruit.FruitBowl

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.