Package org.apache.stratum.xo

Examples of org.apache.stratum.xo.Mapper.map()


    {
        try
        {
            Mapper m = new Mapper();
            m.setDebug(true);
            Container c = (Container) m.map(new File(TEST_DOCUMENT), TEST_CLASS);
           
            assertEquals("item1",c.getItem(0).getName());
            assertEquals("item2",c.getItem(1).getName());
        }           
        catch (Exception e)
View Full Code Here


    {
        try
        {
            Mapper m = new Mapper();
            m.setDebug(true);
            Database d = (Database) m.map(new File(TEST_DOCUMENT), TEST_CLASS);
           
            // Check database properties
            assertTrue("bookstore".equals(d.getName()));
            assertTrue("idbroker".equals(d.getIdMethod()));
           
View Full Code Here

        try
        {
            Mapper m = new Mapper();
            m.setDebug(true);
            Turbine t = new Turbine();
            t = (Turbine) m.map(new File(TEST_DOCUMENT), t);
           
            assertEquals("turbine-classic-pipeline.xml",t.getPipelineDescriptor(0));
            assertEquals("turbine-direct-pipeline.xml",t.getPipelineDescriptor(1));
        }           
        catch (Exception e)
View Full Code Here

    {
        try
        {
            Mapper m = new Mapper();
            m.setDebug(true);
            Person p = (Person) m.map(new File(TEST_DOCUMENT), TEST_CLASS);
           
            assertEquals("Jason",p.getFirstName());
            assertEquals("van Zyl",p.getLastName());
            assertEquals("somnambulism",p.getHobby(0));
            assertEquals("<b>This is my homepage!</b>",p.getHomepage());
View Full Code Here

    {
        try
        {
            Mapper m = new Mapper();
            m.setDebug(true);
            Person p = (Person) m.map(new File(TEST_DOCUMENT), TEST_CLASS);
           
            assertEquals("Jason",p.getFirstName());
            assertEquals("van Zyl",p.getLastName());
            assertEquals("somnambulism",p.getHobby(0));
            assertEquals("squash",p.getHobby(1));
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.