Examples of Banana


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

    }

    public void testMapHeadersWithGenerics() throws Exception
    {
        props.put("apple", new Apple());
        props.put("banana", new Banana());
        props.put("orange", new Orange());

        MuleClient client = new MuleClient(muleContext);
        MuleMessage message = client.send("vm://headersWithGenerics", null, props);
        assertNotNull("return message from MuleClient.send() should not be null", message);
View Full Code Here

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

    }

    public void testListHeadersWithGenerics() throws Exception
    {
        Apple apple = new Apple();
        Banana banana = new Banana();
        Orange orange = new Orange();
        props.put("apple", apple);
        props.put("banana", banana);
        props.put("orange", orange);
View Full Code Here

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

        RedApple redApple = new RedApple();
        redApple.wash();

        muleContext.getRegistry().registerObject("redApple", redApple);
        muleContext.getRegistry().registerObject("anotherRedApple", new RedApple());
        muleContext.getRegistry().registerObject("aBanana", new Banana());

        InvocationResult response = invokeResolver("listFruit", eventContext);
        assertTrue("Message payload should be a List", response.getResult() instanceof List);
        List<Fruit> result = (List<Fruit>) response.getResult();
        assertEquals(2, result.size());
View Full Code Here

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

    {
        @Override
        protected void doConfigure(MuleContext context) throws Exception
        {
            context.getRegistry().registerObject(TEST_STRING_KEY, TEST_STRING_VALUE);
            context.getRegistry().registerObject(TEST_OBJECT_NAME, new Banana());
        }
View Full Code Here

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

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

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

    }
   
    protected void populateTestData(Context context) throws NamingException
    {
        context.bind("fruit/apple", new Apple());
        context.bind("fruit/banana", new Banana());
        context.bind("fruit/orange", new Orange(new Integer(8), new Double(10), "Florida Sunny"));
    }
View Full Code Here

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

    }

    @Override
    public Serializable getStorableValue()
    {
        return new Banana();
    }
View Full Code Here

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

    @Test
    public void payloadAsType() throws Exception
    {
        MuleMessage mockMessage = Mockito.mock(MuleMessage.class);
        Banana b = new Banana();
        Mockito.when(mockMessage.getPayload(Mockito.any(Class.class))).thenReturn(b);
        assertSame(b, evaluate("message.payloadAs(org.mule.tck.testmodels.fruit.Banana)", mockMessage));
    }
View Full Code Here

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

    @Test
    public void payloadAsDataType() throws Exception
    {
        MuleMessage mockMessage = Mockito.mock(MuleMessage.class);
        Banana b = new Banana();
        Mockito.when(mockMessage.getPayload(Mockito.any(DataType.class))).thenReturn(b);
        assertSame(b,
            evaluate("message.payloadAs(org.mule.transformer.types.DataTypeFactory.STRING)", mockMessage));
    }
View Full Code Here

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

        @Override
        protected void doConfigure(MuleContext context) throws Exception
        {
            context.getRegistry().registerObject(TEST_STRING_KEY, TEST_STRING_VALUE);
            context.getRegistry().registerObject(TEST_OBJECT_NAME, new Banana());
        }
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.