Package org.openengsb.core.api.model

Examples of org.openengsb.core.api.model.ModelWrapper


    }

    @Test
    public void tryConvertJSONIntoModelWithAdditionalSerializer_shouldThrowNoException() throws Exception {
        NullModel model = createTestModel();
        ModelWrapper wrapper = ModelWrapper.wrap(model);
        wrapper.addOpenEngSBModelEntry(new OpenEngSBModelEntry("number", 42, Integer.class));
        String result = mapper.writeValueAsString(model);

        NullModel other = JsonUtils.convertObject(result, NullModel.class);
        List<OpenEngSBModelEntry> entries = ModelWrapper.wrap(other).getOpenEngSBModelTail();
        assertThat(model.getId(), is(other.getId()));
View Full Code Here


        model.setName("blub");

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);

        ModelWrapper result = ModelWrapper.wrap(query.getModel(getTestModel(), getModelOid("modeltailtest/1")));
        Boolean versionPresent = result.retrieveInternalModelVersion() != null;
        assertThat(versionPresent, is(true));
    }
View Full Code Here

        model.setName("blub");
        model.setEdbId("modelmetatest/1");

        EKBCommit commit = getTestEKBCommit().addInsert(model.getModel());
        persist.commit(commit);
        ModelWrapper wrapper = ModelWrapper.wrap(query.getModel(getTestModel(), getModelOid("modelmetatest/1")));
        assertThat(wrapper.toOpenEngSBModelEntries(), notNullValue());
        assertThat(wrapper.retrieveInternalModelId(), notNullValue());
        assertThat(wrapper.retrieveInternalModelVersion(), notNullValue());
        assertThat(wrapper.retrieveInternalModelTimestamp(), notNullValue());
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.model.ModelWrapper

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.