Examples of PrimitiveValuedEntity


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

        createEntity();
        createEntity();
    }

    private PrimitiveValuedEntity createEntity() {
        final PrimitiveValuedEntity pve = primitiveValuesEntityRepository.newEntity();
        pve.setBooleanProperty(true);
        pve.setByteProperty((byte)123);
        pve.setShortProperty((short)32123);
        pve.setCharProperty('a');
        pve.setIntProperty(987654321);
        pve.setLongProperty(2345678901234567890L);
        pve.setFloatProperty(12345678901234567890.1234567890F);
        pve.setDoubleProperty(12345678901234567890.1234567890);
        return pve;
    }
View Full Code Here

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

    private void testPercentage() {
        assertEquals(Data.percentage, sqlDataClass.getPercentage());
    }

    private void testStandardValueTypesMaxima() {
        final PrimitiveValuedEntity pveMax = sqlDataClass.getPrimitiveValuedEntityMax();

        assertEquals(Data.shortMaxValue, pveMax.getShortProperty());
        assertEquals(Data.intMaxValue, pveMax.getIntProperty());
        assertEquals(Data.longMaxValue, pveMax.getLongProperty());
        assertEquals(Data.doubleMaxValue, pveMax.getDoubleProperty(), 0.00001f); // fails
        // in
        assertEquals(Data.floatMaxValue, pveMax.getFloatProperty(), 0.00001f);
    }
View Full Code Here

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

        // in
        assertEquals(Data.floatMaxValue, pveMax.getFloatProperty(), 0.00001f);
    }

    private void testStandardValueTypesMinima() {
        final PrimitiveValuedEntity pveMin = sqlDataClass.getPrimitiveValuedEntityMin();

        assertEquals(Data.shortMinValue, pveMin.getShortProperty());
        assertEquals(Data.intMinValue, pveMin.getIntProperty());
        assertEquals(Data.longMinValue, pveMin.getLongProperty());
        assertEquals(Data.doubleMinValue, pveMin.getDoubleProperty(), 0.00001f); // fails
        // in
        // MySQL
        // =
        // infinity
        assertEquals(Data.floatMinValue, pveMin.getFloatProperty(), 0.00001f);
    }
View Full Code Here

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

    @Before
    public void setUp() throws Exception {

        iswf.beginTran();

        PrimitiveValuedEntity entity = repo.newEntity();
        entity.setId(1);
        entity.setIntProperty(111);

        entity = repo.newEntity();
        entity.setId(2);
        entity.setIntProperty(222);

        entity = repo.newEntity();
        entity.setId(3);
        entity.setIntProperty(333);

        entity = repo.newEntity();
        entity.setId(4);
        entity.setIntProperty(111);

        iswf.commitTran();
    }
View Full Code Here

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

        .build();

    @Test
    public void whenNoInstances() {
        iswf.beginTran();
        final PrimitiveValuedEntity entity = repo.findById(1);
        assertThat(entity, is(nullValue()));
        iswf.commitTran();
    }
View Full Code Here

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

        iswf.beginTran();
        repo.newEntity().setId(1);
        iswf.commitTran();
       
        iswf.beginTran();
        final PrimitiveValuedEntity entity = repo.findById(1);
        assertThat(entity, is(not(nullValue())));
        assertThat(entity.getId(), is(1));
        iswf.commitTran();
    }
View Full Code Here

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

    @Before
    public void setUp() throws Exception {

        iswf.beginTran();

        PrimitiveValuedEntity entity = repo.newEntity();
        entity.setId(1);
        entity.setIntProperty(111);

        entity = repo.newEntity();
        entity.setId(2);
        entity.setIntProperty(222);

        entity = repo.newEntity();
        entity.setId(3);
        entity.setIntProperty(333);

        entity = repo.newEntity();
        entity.setId(4);
        entity.setIntProperty(111);

        iswf.commitTran();

    }
View Full Code Here

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

    }
   
    @Test
    public void whenOne() throws Exception {
       
        PrimitiveValuedEntity entity;
       
        iswf.beginTran();

        entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)222));
        assertThat(entity, is(not(nullValue())));
        assertThat(entity.getId(), is(2));

        iswf.commitTran();
    }
View Full Code Here

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

    }

    @Test
    public void whenTwo() throws Exception {
       
        PrimitiveValuedEntity entity;
       
        iswf.beginTran();

        entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)111));
        assertThat(entity, is(not(nullValue())));
        assertThat(entity.getId(), is(1));

        iswf.commitTran();
    }
View Full Code Here

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

    }

    @Test
    public void whenNone() throws Exception {
       
        PrimitiveValuedEntity entity;
       
        iswf.beginTran();

        entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)999));
        assertThat(entity, is(nullValue()));
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.