Package org.openengsb.itests.exam.models

Examples of org.openengsb.itests.exam.models.PrimitivePropertyModelDecorator


        assertThat(commit.getComment(), is("This is the second comment"));
    }

    @Test
    public void testPrimitivePropertyTypeConversion_shouldConvertAndPersistWithCorrectType() throws Exception {
        PrimitivePropertyModelDecorator model = getPrimitivePropertyModelDecorator();
        model.setId("ppm/0");
        model.setBooleanByGet(true);
        model.setBooleanByIs(true);
        model.setPrimitiveChar(Character.MAX_VALUE);
        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);

        assertThat(model.isBooleanByIs(), is(true));
        assertThat(model.getBooleanByGet(), is(true));

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

        // check edb object
        EDBObject edbObject = edbService.getObject(getModelOid("ppm/0"));
        // check entry types
View Full Code Here


    private SubModelDecorator getSubModelDecorator() throws Exception {
        return new SubModelDecorator(getSubModel().newInstance());
    }

    private PrimitivePropertyModelDecorator getPrimitivePropertyModelDecorator() throws Exception {
        return new PrimitivePropertyModelDecorator(getPrimitivePropertyModel().newInstance());
    }
View Full Code Here

TOP

Related Classes of org.openengsb.itests.exam.models.PrimitivePropertyModelDecorator

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.