Package org.mule.api.client

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


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

        MuleMessage response = client.send("vm://testRequestResponse", TEST_MESSAGE, null);

        assertMessageContains(response, getAllPlanetRecords());
    }
}
View Full Code Here


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

        MuleMessage response = client.send("vm://overriddenParamsByName", TEST_MESSAGE, null);

        assertMessageContains(response, TestRecordUtil.getMarsRecord());
    }

    @Test
View Full Code Here

    @Test
    public void readQueriesFromFile() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();
        MuleMessage response = client.send("vm://bulkUpdateFile", TEST_MESSAGE, null);

        assertBulkModeResult(response.getPayload());
    }
}
View Full Code Here

    @Test
    public void usesDynamicQuery() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();
        MuleMessage response = client.send("vm://insertDynamicQuery", "Pluto", null);

        assertInsert(response);
    }

    private void assertInsert(MuleMessage response) throws SQLException
View Full Code Here

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

        MuleMessage response = client.send("vm://inlineOverriddenParamsByName", TEST_MESSAGE, null);

        assertMessageContains(response, TestRecordUtil.getEarthRecord());
    }
}
View Full Code Here

    @Test
    public void returnsErrorWhenMultipleJdbcConfigDefined() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();
        MuleMessage response = client.send("vm://testRequestResponse", TEST_MESSAGE, null);
        assertNotNull(response.getExceptionPayload());
    }

}
View Full Code Here

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

        MuleMessage response = client.send("vm://testRequestResponse", TEST_MESSAGE, null);

        Map payload = (Map) response.getPayload();

        if (testDatabase instanceof MySqlTestDatabase)
        {
View Full Code Here

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

        MuleMessage response = client.send("vm://usesBeanDatasourceConfig", TEST_MESSAGE, null);

        assertMessageContains(response, getAllPlanetRecords());
    }
}
View Full Code Here

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

        MuleMessage response = client.send("vm://placeholderParameterizedQuery", TEST_MESSAGE, null);

        assertMessageContains(response, getAllPlanetRecords());
    }

    @Test
View Full Code Here

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

        MuleMessage response = client.send("vm://placeholderDynamicQuery", TEST_MESSAGE, null);

        assertMessageContains(response, getAllPlanetRecords());
    }

    @Test
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.