Package org.apache.isis.viewer.restfulobjects.applib.domainobjects

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation.asString()


        assertThat(property.getXIsisFormat(), is("javautildate"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isString(), is(true));
        Date utilDate = scalarRepr.asDateTime();
        assertThat(utilDate, is(asDateTime("2013-05-25T12:34:45Z")));
        assertThat(scalarRepr.asString(), is("2013-05-25T12:34:45Z"));

        property = domainObjectRepr.getProperty("myEnum");
        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("string"));
        assertThat(property.getXIsisFormat(), is("string"));
View Full Code Here


        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("string"));
        assertThat(property.getXIsisFormat(), is("string"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isString(), is(true));
        String myEnumStr = scalarRepr.asString();
        assertThat(myEnumStr, is("RED"));
    }


    private static Date asDate(final String text) {
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.