Examples of toOpenEngSBModelEntries()


Examples of org.openengsb.core.api.model.ModelWrapper.toOpenEngSBModelEntries()

    @Test
    public void testIfAddOpenEngSBModelEntryWork_shouldWork() throws Exception {
        ModelWrapper wrapper = ModelWrapper.wrap(new TestModel());
        wrapper.addOpenEngSBModelEntry(new OpenEngSBModelEntry("test", "test", String.class));
        List<OpenEngSBModelEntry> entries = wrapper.toOpenEngSBModelEntries();
        String test = null;
        for (OpenEngSBModelEntry entry : entries) {
            if (entry.getKey().equals("test")) {
                test = (String) entry.getValue();
            }
View Full Code Here

Examples of org.openengsb.core.api.model.ModelWrapper.toOpenEngSBModelEntries()

        ModelWrapper wrapper = ModelWrapper.wrap(new TestModel());
        wrapper.addOpenEngSBModelEntry(new OpenEngSBModelEntry("test", "test", String.class));
        wrapper.removeOpenEngSBModelEntry("test");
        // the result has three elements even though the model has four properties,
        // since the third property is ignored
        assertThat(wrapper.toOpenEngSBModelEntries().size(), is(3));
    }

    @Test
    public void testIfModelIdInsertionWorks_shouldWork() throws Exception {
        TestModel model = new TestModel();
View Full Code Here

Examples of org.openengsb.core.api.model.ModelWrapper.toOpenEngSBModelEntries()

        ChildModel model = new ChildModel();
        model.setId("testId");
        model.setName("testName");
        model.setChild("testChild");
        ModelWrapper wrapper = ModelWrapper.wrap(model);
        List<OpenEngSBModelEntry> entries = wrapper.toOpenEngSBModelEntries();
        assertThat((String) getEntryByName(entries, "id"), is("testId"));
        assertThat((String) getEntryByName(entries, "name"), is("testName"));
        assertThat((String) getEntryByName(entries, "child"), is("testChild"));
        assertThat((String) wrapper.retrieveInternalModelId(), is("testId"));
        assertThat((String) wrapper.retrieveInternalModelIdName(), is("id"));
View Full Code Here

Examples of org.openengsb.core.api.model.ModelWrapper.toOpenEngSBModelEntries()

        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
Copyright © 2018 www.massapi.com. 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.