Package org.mule.api.client

Examples of org.mule.api.client.LocalMuleClient.request()


        assertThat(TEST_MESSAGE_3, equalTo(response.getPayloadAsString()));

        Set<String> responses = new HashSet<String>();
        response = client.request("vm://testOut", RECEIVE_TIMEOUT);
        responses.add(response.getPayloadAsString());
        response = client.request("vm://testOut", RECEIVE_TIMEOUT);
        responses.add(response.getPayloadAsString());

        assertThat(responses, hasItems(equalTo(TEST_MESSAGE_1), equalTo(TEST_MESSAGE_3)));
    }
View Full Code Here


    public void verifiesNoMuleSessionHeader() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

        client.dispatch("vm://testInput", TEST_MESSAGE, null);
        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);

        assertNotNull("Message was filtered", response);
    }
}
View Full Code Here

        File tmpDir = getFtpServerBaseDir();
        createDataFile(tmpDir, TEST_MESSAGE);

        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);

        assertNotNull("Did not processed the file", response);
        assertEquals(TEST_MESSAGE, response.getPayload());
    }
}
View Full Code Here

    @Ignore("MULE-6926: Flaky test.")
    public void invokesFlowExceptionStrategy() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.request("vm://error", RECEIVE_TIMEOUT);
        assertNotNull("Flow exception strategy was not invoked", response);
    }
}
View Full Code Here

    @Test
    public void testServer() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();
        safeProtocolSend("localhost", port.getNumber(), new DefaultMuleMessage(TEST_MESSAGE, muleContext));
        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);
        assertEquals(TEST_MESSAGE, response.getPayload());
    }

    private void safeProtocolSend(String host, int port, DefaultMuleMessage msg) throws IOException, MuleException
    {
View Full Code Here

        File folder = createFolder(getWorkingDirectory().getAbsolutePath());
        createDataFile(folder, TEST_MESSAGE);

        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);

        assertNotNull("Did not processed the file", response);
        assertEquals(TEST_MESSAGE, response.getPayload());
    }
}
View Full Code Here

    public void filtersFiles() throws Exception
    {

        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);
        assertNotNull(response);
        assertThat(response.getPayloadAsString(), equalTo(TEST_MESSAGE));
    }
}
View Full Code Here

    @Test
    public void filtersFile() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);

        assertNotNull("Did not processed the file", response);
        assertEquals(TEST_MESSAGE, response.getPayload());
    }
}
View Full Code Here

    @Test
    public void readsFileWithNoExtension() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);

        assertNotNull("Did not processed the file", response);
    }
}
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.