Package example

Examples of example.Pojo


public class PojoTest {

    @Test
    public void test() throws IOException, SAXException {
        Smooks smooks = new Smooks("smooks-config.xml");
        Pojo pojo = new Pojo(smooks);
        Order order = pojo.filter("input-message.xml");

        assertNotNull(order);
        assertNotNull(order.getHeader());
        assertNotNull(order.getOrderItems());
        assertEquals(2, order.getOrderItems().size());
View Full Code Here


    public void start(BundleContext context) throws Exception
    {
        System.out.println(context.getBundle().getHeaders().get("Bundle-Name") + " start");
       
        final Injector injector = Guice.createInjector(osgiModule(context), new SmooksModule());
        final Pojo pojo = injector.getInstance(Pojo.class);
       
        final String inputFile = (String) context.getBundle().getHeaders().get("Smooks-Input-File");
        final Order order = pojo.filter(inputFile);
       
        ExampleUtil.printOrder(order);
       
    }
View Full Code Here

TOP

Related Classes of example.Pojo

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.