Package org.apache.camel.example

Examples of org.apache.camel.example.Bar


        Foo foo = converter.convertTo(Foo.class, "<foo><zot name=\"bar1\" value=\"value\" otherValue=\"otherValue\"/></foo>");
        assertNotNull("foo should not be null", foo);
        assertEquals("value", foo.getBarRefs().get(0).getValue());

        foo.getBarRefs().clear();
        Bar bar = new Bar();
        bar.setName("myName");
        bar.setValue("myValue");
        foo.getBarRefs().add(bar);

        Exchange exchange = new DefaultExchange(context);
        exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
View Full Code Here


        TypeConverter converter = context.getTypeConverter();

        Foo foo = converter.convertTo(Foo.class, "Not every String is XML");
        assertNull("Should not be able to convert non XML String", foo);

        Bar bar = converter.convertTo(Bar.class, "<bar></bar");
        assertNull("Should not be able to convert misspelled XML String", bar);
    }
View Full Code Here

        assertMockEndpointsSatisfied();
    }

    @Test
    public void testAnotherJaxbModel() throws Exception {
        Object bar = new Bar();
        getMockEndpoint("mock:a").expectedBodiesReceived(bar);
        getMockEndpoint("mock:b").expectedBodiesReceived(bar);

        template.sendBody("direct:a", bar);
View Full Code Here

            "<foo><zot name=\"bar1\" value=\"value\" otherValue=\"otherValue\"/></foo>");
        assertNotNull("foo should not be null", foo);
        assertEquals("value", foo.getBarRefs().get(0).getValue());
       
        foo.getBarRefs().clear();
        Bar bar = new Bar();
        bar.setName("myName");
        bar.setValue("myValue");
        foo.getBarRefs().add(bar);
       
        Exchange exchange = new DefaultExchange(context);
        exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
      
View Full Code Here

        Foo foo = converter.convertTo(Foo.class, "<foo><zot name=\"bar1\" value=\"value\" otherValue=\"otherValue\"/></foo>");
        assertNotNull("foo should not be null", foo);
        assertEquals("value", foo.getBarRefs().get(0).getValue());

        foo.getBarRefs().clear();
        Bar bar = new Bar();
        bar.setName("myName");
        bar.setValue("myValue");
        foo.getBarRefs().add(bar);

        Exchange exchange = new DefaultExchange(context);
        exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
View Full Code Here

        assertEquals(0, failed2.get());
    }

    @Test
    public void testAnotherJaxbModel() throws Exception {
        Object bar = new Bar();
        getMockEndpoint("mock:a").expectedBodiesReceived(bar);
        getMockEndpoint("mock:b").expectedBodiesReceived(bar);

        template.sendBody("direct:a", bar);
View Full Code Here

TOP

Related Classes of org.apache.camel.example.Bar

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.