Examples of TestModel


Examples of org.openengsb.core.ekb.persistence.query.edb.models.TestModel

        assertThat(sub.get(1).getValue(), is("DDDDD"));
    }

    @Test
    public void testListOfComplexAsParameterWithProxiedInterface_shouldWork() throws Exception {
        TestModel model = service.getModel(TestModel.class, "testoid");

        List<SubModel> sub = model.getSubs();
        assertThat(sub.get(0).getId(), is("AAAAA"));
        assertThat(sub.get(0).getValue(), is("BBBBB"));
        assertThat(sub.get(1).getId(), is("CCCCC"));
        assertThat(sub.get(1).getValue(), is("DDDDD"));
    }
View Full Code Here

Examples of org.openengsb.core.ekb.persistence.query.edb.models.TestModel

        assertThat(sub.get(1).getValue(), is("DDDDD"));
    }

    @Test
    public void testComplexAsParameterWithProxiedInterface_shouldWork() throws Exception {
        TestModel model = service.getModel(TestModel.class, "testoid");

        SubModel sub = model.getSub();
        assertThat(sub.getId(), is("testid"));
        assertThat(sub.getValue(), is("testvalue"));

        sub.setId("blabla");
        sub.setValue("blublub");
View Full Code Here

Examples of org.openengsb.core.ekb.persistence.query.edb.models.TestModel

        assertThat(model.getEnumeration(), is(ENUM.B));
    }

    @Test
    public void testInteractionWithEnumValuesWithProxiedInterface_shouldWork() throws Exception {
        TestModel model = service.getModel(TestModel.class, "testoid");

        ENUM temp = model.getEnumeration();
        model.setEnumeration(ENUM.B);
        assertThat(temp, is(ENUM.A));
        assertThat(model.getEnumeration(), is(ENUM.B));
    }
View Full Code Here

Examples of org.openengsb.core.ekb.persistence.query.edb.models.TestModel

        assertThat(model.getEnumeration(), is(ENUM.B));
    }

    @Test
    public void testGetModelProxiedInterfaceReturnsReallyAllValues_shouldWork() throws Exception {
        TestModel model = service.getModel(TestModel.class, "testoid");
        List<OpenEngSBModelEntry> entries = ModelWrapper.wrap(model).toOpenEngSBModelEntries();

        boolean testExists = false;
        Object testValue = null;
        for (OpenEngSBModelEntry entry : entries) {
View Full Code Here

Examples of org.openengsb.core.ekb.persistence.query.edb.models.TestModel

    }

    @Test
    public void testLoadEDBObjectWithWrongModel_shouldReturnNull() throws Exception {
        // testoidimpl returns a TestModel2 object
        TestModel model = service.getModel(TestModel.class, "testoidimpl");
        assertThat(model, nullValue());
    }
View Full Code Here

Examples of org.openengsb.core.ekb.persistence.query.edb.models.TestModel

        assertThat(model, nullValue());
    }

    @Test
    public void testMapSupportOfProxiedInterface_shouldWork() throws Exception {
        TestModel model = service.getModel(TestModel.class, "mapoid");
        assertThat(model.getMap().get("keyA").toString(), is("valueA"));
        assertThat(model.getMap().get("keyB").toString(), is("valueB"));
        assertThat(model.getMap().get("keyC").toString(), is("valueC"));
    }
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.