Package org.openengsb.core.ekb.common.models

Examples of org.openengsb.core.ekb.common.models.WrappedPropertiesModel


        assertThat(model.getPrimitiveDouble(), is(Double.MAX_VALUE));
    }

    @Test
    public void wrappedPropertyConversion_toEDBObject_works() {
        WrappedPropertiesModel model = new WrappedPropertiesModel();
        model.setId("test");
        model.setBooleanByGet(true);
        model.setBooleanByIs(true);
        model.setWrappedChar(Character.MAX_VALUE);
        model.setWrappedDouble(Double.MAX_VALUE);
        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
View Full Code Here


        object.putEDBObjectEntry("wrappedInt", Integer.MAX_VALUE);
        object.putEDBObjectEntry("wrappedLong", Long.MAX_VALUE);
        object.putEDBObjectEntry("wrappedFloat", Float.MAX_VALUE);
        object.putEDBObjectEntry("wrappedDouble", Double.MAX_VALUE);

        WrappedPropertiesModel model = converter.convertEDBObjectToModel(WrappedPropertiesModel.class, object);
        assertThat(model.getId(), is("test"));
        assertThat(model.getBooleanByGet(), is(true));
        assertThat(model.isBooleanByIs(), is(true));
        assertThat(model.getWrappedChar(), is(Character.MAX_VALUE));
        assertThat(model.getWrappedShort(), is(Short.MAX_VALUE));
        assertThat(model.getWrappedInt(), is(Integer.MAX_VALUE));
        assertThat(model.getWrappedLong(), is(Long.MAX_VALUE));
        assertThat(model.getWrappedFloat(), is(Float.MAX_VALUE));
        assertThat(model.getWrappedDouble(), is(Double.MAX_VALUE));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.ekb.common.models.WrappedPropertiesModel

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.