Package org.openengsb.core.ekb.persistence.persist.edb.models

Examples of org.openengsb.core.ekb.persistence.persist.edb.models.SourceModelB


    @Test
    public void testIfDoubleNormalObjectUpdateTriggersEOUpdate_shouldUpdateAlsoEO() throws Exception {
        SourceModelA modelA = new SourceModelA();
        modelA.setNameA("updatedFirstObject");
        modelA.setId("objectA/reference/1");
        SourceModelB modelb = new SourceModelB();
        modelb.setNameB("updatedSecondObject");
        modelb.setId("objectB/reference/1");
        EKBCommit commit = getTestCommit().addUpdate(modelA).addUpdate(modelb);
        int before = commit.getUpdates().size();
        enhancer.onPreCommit(commit);
        int after = commit.getUpdates().size();
        Object inserted = commit.getUpdates().get(commit.getUpdates().size() - 1);
View Full Code Here


        int before = commit.getUpdates().size();
        enhancer.onPreCommit(commit);
        int after = commit.getUpdates().size();
        assertThat(after - before == 2, is(true));
        SourceModelA modelA = null;
        SourceModelB modelB = null;
        for (OpenEngSBModel update : commit.getUpdates()) {
            if (update.retrieveModelName().equals(SourceModelA.class.getName())) {
                modelA = (SourceModelA) update;
            }
            if (update.retrieveModelName().equals(SourceModelB.class.getName())) {
                modelB = (SourceModelB) update;
            }
        }
        assertThat(modelA.getNameA(), is("updatedFirstObject"));
        assertThat(modelB.getNameB(), is("updatedSecondObject"));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.ekb.persistence.persist.edb.models.SourceModelB

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.