Package org.ibeans.api

Examples of org.ibeans.api.Response


        }

        Map<String, Object> props = new HashMap<String, Object>();
        props.put(HttpConstants.HEADER_CONTENT_TYPE, (ctx.getInvocationReturnType()==null ?
                    ctx.getReturnType().getMimeType() : ctx.getInvocationReturnType().getMimeType()));
        Response response = (result instanceof Response ? (Response)result : plugin.createResponse(result, props, null));

        //Now handled in the test case
        if (callback != null)
        {
            try
View Full Code Here


                data = loadData(resource, ret);
                ((MockIBean)ibean).ibeanSetMimeType(mime);
                ((MockIBean)ibean).ibeanSetMessageCallback(callback);

                Response response;
                Map<String, Object> headers = null;
                if(mime!=null)
                {
                    headers = new HashMap<String, Object>();
                    headers.put(MuleProperties.CONTENT_TYPE_PROPERTY, mime.toString());
View Full Code Here

    @Test
    public void testHeaderParamsAndResponse() throws Exception
    {
        testIBean.init("shhh".getBytes());

        Response result = testIBean.doHeaderParamAndResponse("secret");
        assertNotNull(result);
        assertEquals("Value is: secret", result.getPayload());
        assertEquals("shhh", result.getHeader("header1"));
        assertEquals("shhh secret", result.getHeader("header2"));
    }
View Full Code Here

    @Test
    public void testHeaderParamsOnMethodAndResponse() throws Exception
    {
        testIBean.init("shhh".getBytes());

        Response result = testIBean.doMethodHeaderParamAndResponse("secret", new EchoParamFactory());
        assertNotNull(result);
        assertEquals("Value is: secret", result.getPayload());
        assertEquals("shhh", result.getHeader("header1"));
        assertEquals("shhh secret", result.getHeader("header2"));
        assertEquals("echoHeader", result.getHeader("echoHeader"));
    }
View Full Code Here

    @Test
    public void testPropertyParamsOnMethodAndResponse() throws Exception
    {
        testIBean.init("shhh".getBytes());

        Response result = testIBean.doMethodPropertyParamAndResponse("secret", "hello", new ReversePropertyParamFactory("customProperty"));
        assertNotNull(result);
        assertEquals("Value is: secret", result.getPayload());
        assertEquals("shhh", result.getHeader("header1"));
        assertEquals("shhh secret", result.getHeader("header2"));
        assertEquals("olleh", result.getHeader("propHeader"));
    }
View Full Code Here

    @Test
    public void testHeadersWithNoParamsAndResponse() throws Exception
    {
        testIBean.init("shhh".getBytes());
        Response result = testIBean.doTestHeadersWithNoParamsAndResponse();
        assertNotNull(result);
        assertEquals("shhh", result.getHeader("header1"));
    }
View Full Code Here

TOP

Related Classes of org.ibeans.api.Response

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.