Package com.mobixess.jodb.tests.testobjects

Examples of com.mobixess.jodb.tests.testobjects.Object_Enum


        File testFileDir = new File(TEST_DATA_DIR);
        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        Object_Enum objectWithEnum = new Object_Enum();
        objectWithEnum._val1 = TEST_ENUM.ENUM_VAL1;
        sessionContainer.set(objectWithEnum);
   
        sessionContainer.commit();
        if(reopen){
            sessionContainer.close();
            sessionContainer = getContainerForFile(testFile);
        }
        Query query = sessionContainer.query();
       
        query.descend("_val1").constrain(objectWithEnum._val1);
        List list = query.execute();
       
        if(list.size()!=1){
            throw new RuntimeException(""+list.size());
        }
       
        Object_Enum objectWithEnumFromDb = (Object_Enum) list.get(0);
       
        if(!objectWithEnumFromDb._val1.equals(objectWithEnum._val1)){
            throw new RuntimeException();
        }
       
        Object_Enum objectWithEnum1 = new Object_Enum();
        objectWithEnum1._val1 = TEST_ENUM.ENUM_VAL2;
       
        sessionContainer.set(objectWithEnum1);
        sessionContainer.commit();
       
View Full Code Here


        }
       
        sessionContainer.printFileMap();
       
       
        Object_Enum object_Enum = new Object_Enum();
        object_Enum._val1 = TEST_ENUM.ENUM_VAL1;
        sessionContainer.set(object_Enum);
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
View Full Code Here

TOP

Related Classes of com.mobixess.jodb.tests.testobjects.Object_Enum

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.