Package org.apache.isis.core.tck.dom.scalars

Examples of org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity


        createEntity();
        createEntity();
    }

    private WrapperValuedEntity createEntity() {
        final WrapperValuedEntity wve = wrapperValuesEntityRepository.newEntity();
        wve.setBooleanProperty(true);
        wve.setByteProperty((byte)123);
        wve.setShortProperty((short)32123);
        wve.setCharacterProperty('a');
        wve.setIntegerProperty(987654321);
        wve.setLongProperty(2345678901234567890L);
        wve.setFloatProperty(12345678901234567890.1234567890F);
        wve.setDoubleProperty(12345678901234567890.1234567890);

        return wve;
    }
View Full Code Here


   
    @Test
    public void persist_then_update() throws Exception {
        iswf.beginTran();
        WrapperValuedEntity entity = repo.newEntity();
        entity.setStringProperty("1");
        entity.setBooleanProperty(false);
        entity.setByteProperty((byte)321);
        entity.setDoubleProperty(123456768723429.0);
        entity.setFloatProperty(654321.0f);
        entity.setIntegerProperty(543);
        entity.setLongProperty(90876512345L);
        entity.setShortProperty((short)7654);
        entity.setCharacterProperty('A');
       
        iswf.commitTran();

        iswf.bounceSystem();

        iswf.beginTran();
        entity = repo.list().get(0);
        assertThat(entity.getStringProperty(), is("1"));
        assertThat(entity.getBooleanProperty(), is(false));
        assertThat(entity.getByteProperty(), is((byte)321));
        assertThat(entity.getDoubleProperty(), is(123456768723429.0));
        assertThat(entity.getFloatProperty(), is(654321.0f));
        assertThat(entity.getIntegerProperty(), is(543));
        assertThat(entity.getLongProperty(), is(90876512345L));
        assertThat(entity.getShortProperty(), is((short)7654));
        assertThat(entity.getCharacterProperty(), is('A'));
       
       
        entity.setBooleanProperty(true);
        entity.setByteProperty((byte)123);
        entity.setDoubleProperty(9876543210987.0);
        entity.setFloatProperty(123456.0f);
        entity.setIntegerProperty(456);
        entity.setLongProperty(12345678901L);
        entity.setShortProperty((short)4567);
        entity.setCharacterProperty('X');
       
        iswf.commitTran();

        iswf.bounceSystem();

        iswf.beginTran();
        entity = repo.list().get(0);
        assertThat(entity.getBooleanProperty(), is(true));
        assertThat(entity.getByteProperty(), is((byte)123));
        assertThat(entity.getDoubleProperty(), is(9876543210987.0));
        assertThat(entity.getFloatProperty(), is(123456.0f));
        assertThat(entity.getIntegerProperty(), is(456));
        assertThat(entity.getLongProperty(), is(12345678901L));
        assertThat(entity.getShortProperty(), is((short)4567));
        assertThat(entity.getCharacterProperty(), is('X'));
       
        iswf.commitTran();
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity

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.