Package org.apache.isis.runtimes.dflt.objectstores.sql.testsystem.dataclasses

Examples of org.apache.isis.runtimes.dflt.objectstores.sql.testsystem.dataclasses.SimpleClassTwo


    public List<SimpleClassTwo> allSimpleClassTwos() {
        return allInstances(SimpleClassTwo.class);
    }

    public SimpleClassTwo newSimpleClassTwo() {
        final SimpleClassTwo object = newTransientInstance(SimpleClassTwo.class);
        return object;
    }
View Full Code Here


     * string); } }
     */

    public void testSingleReferenceLazy() {
        final SqlDataClass sqlDataClass = SqlIntegrationTestSingleton.getDataClass();
        final SimpleClassTwo a = sqlDataClass.getSimpleClassTwo();
        if (getProperties().getProperty("isis.persistor") != "in-memory") {
            assertEquals(null, a.text); // must check direct value, as
            // framework can auto-resolve, if you use getText()
        }
    }
View Full Code Here

    public void testSimpleClassTwoReferenceLazy() {
        final SqlDataClass sqlDataClass = SqlIntegrationTestSingleton.getDataClass();
        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
        if (getProperties().getProperty("isis.persistor") != "in-memory") {
            for (final SimpleClass simpleClass : collection) {
                final SimpleClassTwo a = simpleClass.getSimpleClassTwoA();
                assertEquals(null, a.text); // must check direct value, as
                                            // framework can auto-resolve, if
                                            // you use getText()
            }
        }
View Full Code Here

    }

    public void testSingleReferenceResolve() {
        final SqlDataClassFactory factory = SqlIntegrationTestSingleton.getSqlDataClassFactory();
        final SqlDataClass sqlDataClass = SqlIntegrationTestSingleton.getDataClass();
        final SimpleClassTwo a = sqlDataClass.getSimpleClassTwo();
        factory.resolve(a);
        assertEquals(simpleClassTwoA.getText(), a.getText());
    }
View Full Code Here

    public void testSimpleClassTwoReferenceResolve() {
        final SqlDataClassFactory factory = SqlIntegrationTestSingleton.getSqlDataClassFactory();
        final SqlDataClass sqlDataClass = SqlIntegrationTestSingleton.getDataClass();
        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
        for (final SimpleClass simpleClass : collection) {
            final SimpleClassTwo a = simpleClass.getSimpleClassTwoA();
            factory.resolve(a);
            assertEquals(simpleClassTwoA.getText(), a.getText());
            assertEquals(simpleClassTwoA.getIntValue(), a.getIntValue());
            assertEquals(simpleClassTwoA.getBooleanValue(), a.getBooleanValue());
        }
    }
View Full Code Here

    public void testUpdate1() {
        final SqlDataClassFactory factory = SqlIntegrationTestSingleton.getSqlDataClassFactory();
        final List<SimpleClassTwo> classes = factory.allSimpleClassTwos();
        assertEquals(2, classes.size());

        final SimpleClassTwo simpleClass = classes.get(0);
        simpleClass.setText("XXX");
        simpleClass.setBooleanValue(false);
        simpleClassTwoA.setBooleanValue(false);
        if (getProperties().getProperty("isis.persistor") != "in-memory") {
            getSingletonInstance().setState(0);
        }
    }
View Full Code Here

    public void testUpdate2() {
        final SqlDataClassFactory factory = SqlIntegrationTestSingleton.getSqlDataClassFactory();
        final List<SimpleClassTwo> classes = factory.allSimpleClassTwos();
        assertEquals(2, classes.size());

        final SimpleClassTwo simpleClass = classes.get(0);
        assertEquals("XXX", simpleClass.getText());
        assertEquals(simpleClassTwoA.getBooleanValue(), simpleClass.getBooleanValue());

        getSingletonInstance().setState(1);
    }
View Full Code Here

    public List<SimpleClassTwo> allSimpleClassTwos() {
        return allInstances(SimpleClassTwo.class);
    }

    public SimpleClassTwo newSimpleClassTwo() {
        final SimpleClassTwo object = newTransientInstance(SimpleClassTwo.class);
        return object;
    }
View Full Code Here

     * assertEquals(SqlIntegrationTestCommon.stringList.get(i++), string); } }
     */

    public void testSingleReferenceLazy() {
        final SqlDataClass sqlDataClass = SqlIntegrationTestSingleton.getDataClass();
        final SimpleClassTwo a = sqlDataClass.getSimpleClassTwo();
        if (getProperties().getProperty("isis.persistor") != "in-memory") {
            assertEquals(null, a.text); // must check direct value, as
            // framework can auto-resolve, if you use getText()
        }
    }
View Full Code Here

    public void testSimpleClassTwoReferenceLazy() {
        final SqlDataClass sqlDataClass = SqlIntegrationTestSingleton.getDataClass();
        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
        if (getProperties().getProperty("isis.persistor") != "in-memory") {
            for (final SimpleClass simpleClass : collection) {
                final SimpleClassTwo a = simpleClass.getSimpleClassTwoA();
                assertEquals(null, a.text); // must check direct value, as
                                            // framework can auto-resolve, if
                                            // you use getText()
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.objectstores.sql.testsystem.dataclasses.SimpleClassTwo

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.