Package org.openengsb.core.ekb.api

Examples of org.openengsb.core.ekb.api.ConnectorInformation


        model.setPrimitiveDouble(Double.MAX_VALUE);
        model.setPrimitiveFloat(Float.MAX_VALUE);
        model.setPrimitiveInt(Integer.MAX_VALUE);
        model.setPrimitiveLong(Long.MAX_VALUE);
        model.setPrimitiveShort(Short.MAX_VALUE);
        ConnectorInformation id = getTestConnectorInformation();
        List<EDBObject> objects = converter.convertModelToEDBObject(model, id);
        EDBObject object = objects.get(0);
        // check entry types
        assertThat(object.get("booleanByGet").getType(), is(Boolean.class.getName()));
        assertThat(object.get("booleanByIs").getType(), is(Boolean.class.getName()));
View Full Code Here


        model.setWrappedFloat(Float.MAX_VALUE);
        model.setWrappedInt(Integer.MAX_VALUE);
        model.setWrappedLong(Long.MAX_VALUE);
        model.setWrappedShort(Short.MAX_VALUE);

        ConnectorInformation id = getTestConnectorInformation();
        List<EDBObject> objects = converter.convertModelToEDBObject(model, id);
        EDBObject object = objects.get(0);
        // check entry types
        assertThat(object.get("booleanByGet").getType(), is(Boolean.class.getName()));
        assertThat(object.get("booleanByIs").getType(), is(Boolean.class.getName()));
View Full Code Here

        model.setName("testobject");
        model.setCheck(false);
        model.setCheck2(true);
        model.setCheck3(false);

        ConnectorInformation id = getTestConnectorInformation();

        List<EDBObject> objects = converter.convertModelToEDBObject(model, id);
        EDBObject object = objects.get(0);

        assertThat(object.getString("connectorId"), is("testconnector"));
View Full Code Here

        model.setId("test");
        SubModel sub = new SubModel();
        sub.setId("sub");
        sub.setValue("teststring");
        model.setSub(sub);
        ConnectorInformation id = getTestConnectorInformation();

        List<EDBObject> objects = converter.convertModelToEDBObject(model, id);
        EDBObject object = objects.get(1);
        assertThat(object.getString("sub"), is(ModelWrapper.wrap(sub).getCompleteModelOID()));
        EDBObject subObject = objects.get(0);
View Full Code Here

        rootChildChildChild.setId("root_child_child_child");

        root.setChild(rootChild);
        rootChild.setChild(rootChildChild);
        rootChildChild.setChild(rootChildChildChild);
        ConnectorInformation id = getTestConnectorInformation();

        // test
        List<EDBObject> objects = converter.convertModelToEDBObject(root, id);
        // assert
        EDBObject obj = objects.get(3);
View Full Code Here

        List<RecursiveModel> rootChildren = Arrays.asList(new RecursiveModel[]{ rootChild1, rootChild2 });
        List<RecursiveModel> child2Children = Arrays.asList(new RecursiveModel[]{ child2Child1, child2Child2 });
        root.setChildren(rootChildren);
        rootChild1.setChild(child1Child1);
        rootChild2.setChildren(child2Children);
        ConnectorInformation id = getTestConnectorInformation();
        // test
        List<EDBObject> objects = converter.convertModelToEDBObject(root, id);
        // assert
        EDBObject obj = objects.get(5);
        assertThat(obj.getString("id"), is("root"));
View Full Code Here

    @Test
    public void testIfEDBObjectsContainCorrectType_shouldWork() throws Exception {
        TestModel model = new TestModel();
        model.setNumber(42);
        ConnectorInformation id = getTestConnectorInformation();
        List<EDBObject> objects = converter.convertModelToEDBObject(model, id);
        EDBObject object = objects.get(0);
        EDBObjectEntry entry = object.get("number");
        assertThat(entry.getType(), is(Integer.class.getName()));
    }
View Full Code Here

        sub2.setValue("teststring2");
        List<SubModel> subs = new ArrayList<SubModel>();
        subs.add(sub1);
        subs.add(sub2);
        model.setSubs(subs);
        ConnectorInformation id = getTestConnectorInformation();
        List<EDBObject> objects = converter.convertModelToEDBObject(model, id);
        EDBObject object = objects.get(2);
        EDBObject subObject1 = objects.get(0);
        EDBObject subObject2 = objects.get(1);
View Full Code Here

        map.put("keyA", "valueA");
        map.put("keyB", "valueB");
        TestModel model = new TestModel();
        model.setId("test");
        model.setMap(map);
        ConnectorInformation id = getTestConnectorInformation();
        EDBObject object = converter.convertModelToEDBObject(model, id).get(0);

        assertThat(object.getString(EDBConverter.getEntryNameForMapKey("map", 0)), is("keyA"));
        assertThat(object.getString(EDBConverter.getEntryNameForMapValue("map", 0)), is("valueA"));
        assertThat(object.getString(EDBConverter.getEntryNameForMapKey("map", 1)), is("keyB"));
View Full Code Here

        return EDBConverter.getEOReferenceStringFromAnnotation(model.getDeclaredField(field).getAnnotation(
            OpenEngSBForeignKey.class));
    }

    private ConnectorInformation getTestConnectorInformation() {
        return new ConnectorInformation("testdomain", "testconnector", "testinstance");
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.ekb.api.ConnectorInformation

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.