Package org.mule.api.client

Examples of org.mule.api.client.MuleClient.dispatch()


{
    @Test
    public void testInlineScript() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in1", "Important Message", null);
        MuleMessage response = client.request("vm://out1", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("Important Message Received", response.getPayloadAsString());
    }
View Full Code Here


    @Ignore("MULE-6926: flaky test")
    @Test
    public void testFileBasedScript() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in2", "Important Message", null);
        MuleMessage response = client.request("vm://out2", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("Important Message Received", response.getPayloadAsString());
    }
View Full Code Here

    @Test
    public void testReferencedScript() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in3", "Important Message", null);
        MuleMessage response = client.request("vm://out3", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("Important Message Received", response.getPayloadAsString());
    }
View Full Code Here

    @Test
    public void testInlineScript() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in1", "hello", null);
        MuleMessage response = client.request("vm://out1", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("hexxo", response.getPayload());
    }
View Full Code Here

    @Ignore("MULE-6926: flaky test")
    @Test
    public void testScriptVariables() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in4", "Important Message", null);
        MuleMessage response = client.request("vm://out4", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("Important Message Received A-OK", response.getPayloadAsString());
    }
View Full Code Here

    @Test
    public void testFileBasedScript() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in2", "hello", null);
        MuleMessage response = client.request("vm://out2", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("hexxo", response.getPayload());
    }
View Full Code Here

    @Test
    public void testReferencedTransformer() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in3", "hello", null);
        MuleMessage response = client.request("vm://out3", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("hexxo", response.getPayload());
    }
View Full Code Here

    @Test
    public void testBindingCallout() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("client_request", "Important Message", null);
        MuleMessage response = client.request("client_response", 2000);
        assertNotNull(response);
        assertEquals("Important Message Received by Callout1 Received by Callout2", response.getPayloadAsString());
    }
}
View Full Code Here

    @Test
    public void testReferencedTransformerWithParameters() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://in4", "hello", null);
        MuleMessage response = client.request("vm://out4", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertEquals("hexxo", response.getPayload());
    }
View Full Code Here

    @Test
    public void testFunctionalTest() throws Exception
    {
        MuleClient client = muleContext.getClient();

        client.dispatch(DEFAULT_INPUT_QUEUE, FIRST_MESSAGE, null);
        MuleMessage message = client.request(DEFUALT_OUTPUT_QUEUE, TIMEOUT);
        assertNotNull(message);
        assertNotNull(message.getPayload());
        assertNull(message.getExceptionPayload());
        assertEquals(FIRST_MESSAGE, message.getPayload());
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.