Package org.apache.jackrabbit.ocm.testmodel.enumeration

Examples of org.apache.jackrabbit.ocm.testmodel.enumeration.Odyssey


        try
        {
            // --------------------------------------------------------------------------------
            // Create and store an object graph in the repository
            // --------------------------------------------------------------------------------
            Odyssey odyssey = new Odyssey();
            odyssey.setPath("/odesseyToMars");
            odyssey.setGoingTo(Planet.MARS);
            odyssey.setStartingFrom(Planet.EARTH);
            odyssey.setStops(getStops());
            ocm.insert(odyssey);
            Odyssey fbOdessey = (Odyssey)ocm.getObject("/odesseyToMars");
            assertTrue("Fetched back Enum did not match the saved data", fbOdessey.getGoingTo() == Planet.MARS);
            assertTrue("Fetched back Enum did not match the saved data", fbOdessey.getStartingFrom() == Planet.EARTH);
            assertTrue("Fetched back Enum did not match the saved Enum Collection Size", fbOdessey.getStops().size() == odyssey.getStops().size());
            List<Planet> stops = getStops();
            List<Planet> fbStops = fbOdessey.getStops();
            for (Planet aStop : stops){
              assertContains("Fetched back list did not contain :" + aStop.toString(), aStop, fbStops);
                log.info("Contains Enum : " + aStop.toString());
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.testmodel.enumeration.Odyssey

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.