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

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation


        assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
       
        assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
       
        final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);

        assertThat(listRepr.getValue().size(), is(2));
    }
View Full Code Here


        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
       
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
       
        assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
        final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);

        // then list value
        assertThat(listRepr.getValue(), is(not(nullValue())));
        assertThat(listRepr.getValue().size(), is(5));

        final JsonRepresentation domainObjectLinkRepr = listRepr.getValue().arrayGet(0);

        assertThat(domainObjectLinkRepr, is(not(nullValue())));
        assertThat(domainObjectLinkRepr, isLink()
                .rel(Rel.ELEMENT)
                .title("Untitled Actions Entity")
                .httpMethod(RestfulHttpMethod.GET)
                .href(matches("http://localhost:\\d+/objects/RTNE/67"))
                .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
                .arguments(JsonRepresentation.newMap())
                .build());

        // then list link element-type
        assertThat(listRepr.getLinks(), is(not(nullValue())));
        final LinkRepresentation elementTypeLink = listRepr.getLinkWithRel(Rel.ELEMENT_TYPE);
        assertThat(elementTypeLink, is(not(nullValue())));
    }
View Full Code Here

       
        assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
       
        assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
        final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
        assertThat(listRepr.getValue().size(), is(5));
    }
View Full Code Here

       
        assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
       
        assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
        final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
        assertThat(listRepr.getValue().size(), is(5));
    }
View Full Code Here

        assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
       
        assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
       
        final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);

        assertThat(listRepr.getValue().size(), is(2));
    }
View Full Code Here

        assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
        final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
       
        assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
       
        final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);

        assertThat(listRepr.getValue().size(), is(2));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation

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.