Examples of ProxyBuilder


Examples of org.apache.camel.builder.ProxyBuilder

        assertEquals("Hi nobody", reply);
    }

    public void testProxyBuilderProxyCallAnotherBeanWithNoArgs() throws Exception {
        Endpoint endpoint = context.getEndpoint("direct:bean");
        OrderService service = new ProxyBuilder(context).endpoint(endpoint).build(OrderService.class);

        String reply = service.doAbsolutelyNothing();
        assertEquals("Hi nobody", reply);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertMockEndpointsSatisfied();
    }

    public void testProxyBuilderVoidAsInOut() throws Exception {
        // will by default let all exchanges be InOut
        OrderService service = new ProxyBuilder(context).endpoint("seda:delay").build(OrderService.class);

        getMockEndpoint("mock:delay").expectedBodiesReceived("Hello World", "Bye World");
        service.doNothing("Hello World");
        template.sendBody("mock:delay", "Bye World");
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        }
    }

    @Test
    public void testHttpClientProxyOk() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        String out = proxy.hello("World");

        assertEquals("Hello World", out);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertEquals("Hello World", out);
    }

    @Test
    public void testHttpClientProxyException() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        try {
            proxy.hello("Kaboom");
            fail("Should have thrown exception");
        } catch (MyAppException e) {
            assertEquals("Kaboom", e.getName());
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        }
    }

    @Test
    public void testHttpClientProxyOk() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        String out = proxy.hello("World");

        assertEquals("Hello World", out);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertEquals("Hello World", out);
    }

    @Test
    public void testHttpClientProxyException() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        try {
            proxy.hello("Kaboom");
            fail("Should have thrown exception");
        } catch (UndeclaredThrowableException e) {
            HttpOperationFailedException cause = assertIsInstanceOf(HttpOperationFailedException.class, e.getCause());
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        }
    }

    @Test
    public void testHttpClientProxyOk() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        String out = proxy.hello("World");

        assertEquals("Hello World", out);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertEquals("Hello World", out);
    }

    @Test
    public void testHttpClientProxyException() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        try {
            proxy.hello("Kaboom");
            fail("Should have thrown exception");
        } catch (MyAppException e) {
            assertEquals("Kaboom", e.getName());
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        }
    }

    @Test
    public void testHttpClientProxyOk() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        String out = proxy.hello("World");

        assertEquals("Hello World", out);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertEquals("Hello World", out);
    }

    @Test
    public void testHttpClientProxyException() throws Exception {
        MyCoolService proxy = new ProxyBuilder(context).endpoint("direct:cool").build(MyCoolService.class);
        try {
            proxy.hello("Kaboom");
            fail("Should have thrown exception");
        } catch (UndeclaredThrowableException e) {
            HttpOperationFailedException cause = assertIsInstanceOf(HttpOperationFailedException.class, e.getCause());
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.