Package org.apache.commons.collections.map

Examples of org.apache.commons.collections.map.SingletonMap$SingletonValues


    {
        muleContext.getRegistry().registerObject("streamToObjectTransformer", new ByteArrayToObject());
        MuleClient client = new MuleClient(muleContext);
        // there are some default built into the http url service (note a different port)
        @SuppressWarnings("unchecked")
        Map<String, String> props = new SingletonMap("http.method", HttpConstants.METHOD_GET);
        MuleMessage result = client.send("http://localhost:11081", null, props);
        assertNotNull("Result is null", result);
        assertFalse("Result is null", result.getPayload() instanceof NullPayload);
        assertNull(result.getExceptionPayload());
View Full Code Here


    public void testDefaultLoanBrokerRequest() throws Exception
    {
        MuleClient client = muleContext.getClient();

        @SuppressWarnings("unchecked")
        Map<String, Object> props = new SingletonMap("http.method", HttpConstants.METHOD_GET);

        MuleMessage result = client.send("http://localhost:" + loanBrokerSyncPort.getNumber() + "?name=Muley&amount=20000&term=48&ssn=1234", null, props);
        assertNotNull("Result is null", result);
        assertFalse("Result is null", result.getPayload() instanceof NullPayload);
        assertNull(result.getExceptionPayload());
View Full Code Here

    public void testIncompleteLoanBrokerRequest() throws Exception
    {
        MuleClient client = muleContext.getClient();

        @SuppressWarnings("unchecked")
        Map<String, Object> props = new SingletonMap("http.method", HttpConstants.METHOD_GET);

        MuleMessage result = client.send("http://localhost:" + loanBrokerSyncPort.getNumber() + "?amount=1234", null, props);
        assertEquals("Error: incomplete request", result.getPayloadAsString());
    }
View Full Code Here

    public void testWrongLoanBrokerRequest() throws Exception
    {
        MuleClient client = muleContext.getClient();

        @SuppressWarnings("unchecked")
        Map<String, Object> props = new SingletonMap("http.method", HttpConstants.METHOD_GET);

        MuleMessage result = client.send("http://localhost:" + loanBrokerSyncPort.getNumber() + "?name=Muley&term=48&ssn=1234&amount=abcd", null, props);
        assertEquals("Error processing loan request", result.getPayloadAsString());
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.map.SingletonMap$SingletonValues

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.