Package com.mobixess.jodb.tests.testobjects

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


        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectA objectA = new ObjectA((byte)2,(byte)3,null);
        ObjectA objectA1 = new ObjectA((byte)4,(byte)3,null);
        ObjectB objectB = new ObjectB();
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectA1);
        sessionContainer.set(objectB);
        sessionContainer.commit();
View Full Code Here


        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectA objectA = new ObjectA((byte)2,(byte)3,null);
        ObjectB objectB = new ObjectB();
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectB);

        sessionContainer.commit();
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectA objectA = new ObjectA((byte)2, (short)3,null);
        ObjectB objectB = new ObjectB();
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectB);

        sessionContainer.close();
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectA objectA = new ObjectA((byte)2, (short)3,null);
        ObjectB objectB = new ObjectB();
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectB);

        sessionContainer.close();
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectA objectA = new ObjectA((byte)0,(short)1,null);
        ObjectB objectB = new ObjectB();
       
        sessionContainer.set(objectA);
        sessionContainer.set(objectB);
       
        sessionContainer.commit();
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
       
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectB objectB = new ObjectB();
        ObjectA objectA = new ObjectA((byte)1,(short)2,objectB);
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        sessionContainer.printFileMap();
        List classes = sessionContainer.getAllObjects();
       
        if(classes.size()!=2){
            throw new RuntimeException(""+classes.size());
        }
       
        int index = classes.indexOf(objectA);
       
        if(index == -1){
            throw new RuntimeException();
        }
        Object obj = classes.get(index);
        if(obj.getClass() != objectA.getClass()){
            throw new RuntimeException();
        }
        ObjectA objA = (ObjectA) obj;
        if(objA.getVal1() != objectA.getVal1() || objA.getVal2() != objectA.getVal2()){
            throw new RuntimeException();
        }
       
        if(objA.getVal3().getClass() != objectB.getClass()){
            throw new RuntimeException();
        }
       
        int bIndex = classes.indexOf(objectB);
       
        if(bIndex == -1){
            throw new RuntimeException();
        }
       
        ObjectB objectB2 = (ObjectB) classes.get(bIndex);
       
        if(objectB2._val3 != objA){
            throw new RuntimeException();
        }
       
        objectB2 = new ObjectB();
        objA.setVal3(objectB2);
        sessionContainer.set(objA);
       
        sessionContainer.commit();
       
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
       
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectB objectB = new ObjectB();
        ObjectA objectA = new ObjectA((byte)1,(short)2,objectB);
        ObjectA objectA2 = new ObjectA((byte)3,(byte)3,objectB);
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectA2);
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        List classes = sessionContainer.getAllObjects();
       
        if(classes.size()!=3){
            throw new RuntimeException();
        }
       
        int index = classes.indexOf(objectA);
       
        if(index == -1){
            throw new RuntimeException();
        }
        Object obj = classes.get(index);
        if(obj.getClass() != objectA.getClass()){
            throw new RuntimeException();
        }
        ObjectA objA = (ObjectA) obj;
        if(objA.getVal1() != objectA.getVal1() || objA.getVal2() != objectA.getVal2()){
            throw new RuntimeException();
        }
       
        if(objA.getVal3().getClass() != objectB.getClass()){
            throw new RuntimeException();
        }
       
        int bIndex = classes.indexOf(objectB);
       
        if(bIndex == -1){
            throw new RuntimeException();
        }
       
        ObjectB objectB2 = (ObjectB) classes.get(bIndex);
       
        if(objectB2._val3 != objA){
            throw new RuntimeException();
        }
       
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
       
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectB objectB = new ObjectB();
        ObjectA objectA = new ObjectA((byte)1,(short)2,null);
        ObjectA objectA2 = new ObjectA((byte)3,(byte)3,objectB);
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectA2);
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        List classes = sessionContainer.getAllObjects();
       
        if(classes.size()!=3){
            throw new RuntimeException();
        }
       
        int index = classes.indexOf(objectA);
       
        if(index == -1){
            throw new RuntimeException();
        }
        Object obj = classes.get(index);
        if(obj.getClass() != objectA.getClass()){
            throw new RuntimeException();
        }
        ObjectA objA = (ObjectA) obj;
        if(objA.getVal1() != objectA.getVal1() || objA.getVal2() != objectA.getVal2()){
            throw new RuntimeException();
        }
       
       
        int bIndex = classes.indexOf(objectB);
       
        if(bIndex == -1){
            throw new RuntimeException();
        }
       
        ObjectB objectB2 = (ObjectB) classes.get(bIndex);
       
        if(objectB2._val3 != objA){
            throw new RuntimeException();
        }
       
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
       
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectB objectB = new ObjectB();
        ObjectA objectA = new ObjectA((byte)1,(short)2,objectB);
        ObjectA objectA2 = new ObjectA((byte)3,(byte)3,null);
        objectB._val3 = objectA2;
        sessionContainer.set(objectA);
        sessionContainer.commit();
View Full Code Here

        testFileDir.mkdirs();
        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
       
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        ObjectB objectB = new ObjectB();
        ObjectA objectA = new ObjectA((byte)1,(short)2,objectB);
        ObjectA objectA2 = new ObjectA((byte)3,(byte)3,objectB);
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectA2);
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        List classes = sessionContainer.getAllObjects();
       
        if(classes.size()!=3){
            throw new RuntimeException();
        }
       
        int index = classes.indexOf(objectA);
       
        if(index == -1){
            throw new RuntimeException();
        }
        Object obj = classes.get(index);
        if(obj.getClass() != objectA.getClass()){
            throw new RuntimeException();
        }
        ObjectA objA = (ObjectA) obj;
        if(objA.getVal1() != objectA.getVal1() || objA.getVal2() != objectA.getVal2()){
            throw new RuntimeException();
        }
       
        if(objA.getVal3().getClass() != objectB.getClass()){
            throw new RuntimeException();
        }
       
        int bIndex = classes.indexOf(objectB);
       
        if(bIndex == -1){
            throw new RuntimeException();
        }
       
        ObjectB objectB2 = (ObjectB) classes.get(bIndex);
       
        if(objectB2._val3 != objA){
            throw new RuntimeException();
        }
       
View Full Code Here

TOP

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

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.