Package org.mule.api.client

Examples of org.mule.api.client.LocalMuleClient


    }

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

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

        assertMessageContains(response, getAllPlanetRecords());
    }
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());
    }
View Full Code Here

    }

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

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

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

    }

    @Test
    public void testRequestResponse() 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 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 usesCustomTarget() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

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

        assertInsert(response.getInboundProperty("updateCount"));
    }
View Full Code Here

    }

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

        MuleMessage response = client.send("vm://selectParameterizedQuery", MARS.getName(), null);

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

    }

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

        MuleMessage response = client.send("vm://delete", VENUS.getName(), null);

        assertDelete(response);
    }
View Full Code Here

    }

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

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

        assertEquals(1, response.getPayload());
        List<Map<String, String>> result = selectData("select * from PLANET where POSITION=4", getDefaultDataSource());
        assertRecords(result, new Record(new Field("NAME", "Mercury"), new Field("POSITION", 4)));
    }
View Full Code Here

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

            client.dispatch("vm://testIn", TEST_MESSAGE, null);
            client.dispatch("vm://testIn", TEST_MESSAGE, null);

            MuleMessage response = client.request("vm://connectionError", RECEIVE_TIMEOUT);
            assertThat(response.getExceptionPayload().getException(), is(instanceOf(MessagingException.class)));
        }
        finally
        {
            connectionLatch.countDown();
View Full Code Here

TOP

Related Classes of org.mule.api.client.LocalMuleClient

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.