Examples of asDateTime()


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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("date-time"));
        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"));
View Full Code Here

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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("date-time"));
        assertThat(property.getXIsisFormat(), is("jodadatetime"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isString(), is(true));
        assertThat(scalarRepr.asDateTime(), is(asDateTime("2010-03-31T09:50:43Z")));
        assertThat(scalarRepr.asString(), is("2010-03-31T09:50:43Z"));

        property = domainObjectRepr.getProperty("localDateProperty");
        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("date"));
View Full Code Here

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

        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isString(), is(true));

        final LocalDateTime expected = new LocalDateTime(2009, 4, 29, 13, 45, 22);

        assertThat(scalarRepr.asDateTime(), is(expected.toDate()));
        assertThat(scalarRepr.asString(), is(ISODateTimeFormat.dateTimeNoMillis().withZoneUTC().print(expected.toDateTime())));

        // and then member types have links to details (selected ones inspected only)
        property = domainObjectRepr.getProperty("localDateProperty");
        assertThat(property.getLinkWithRel(Rel.DETAILS),
View Full Code Here

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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("date-time"));
        assertThat(property.getXIsisFormat(), is("jodalocaldatetime"));
        scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
        assertThat(scalarRepr.isString(), is(true));
        java.util.Date dateTimeValue = scalarRepr.asDateTime();
        assertThat(dateTimeValue, is(not(nullValue())));
        assertThat(scalarRepr.asString(), IsisMatchers.startsWith("2009-04-29T13:45:22+0100"));

        // and then member types have links to details (selected ones inspected only)
        property = domainObjectRepr.getProperty("localDateProperty");
View Full Code Here

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

        assertThat(property.getMemberType(), is("property"));
        assertThat(property.getFormat(), is("date-time"));
        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"));
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.