Examples of executeT()


Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

    @Test
    public void self() throws Exception {
        final String href = givenHrefToService("WrapperValuedEntities");

        final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "links[rel=self]");
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final DomainObjectRepresentation repr = restfulResponse.getEntity();
       
        assertThat(repr.getSelf().getValue(), is(not(nullValue())));
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

    @Test
    public void toDescribedBy() throws Exception {
        final String href = givenHrefToService("WrapperValuedEntities");

        final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "links[rel=describedby]");
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final DomainObjectRepresentation repr = restfulResponse.getEntity();
       
        assertThat(repr.getLinkWithRel(Rel.DESCRIBEDBY).getValue(), is(not(nullValue())));
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

    @Test
    public void toMembersDetails() throws Exception {
        final String href = givenHrefToService("WrapperValuedEntities");

        final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members.links[rel=%s]", Rel.DETAILS.getName());
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final DomainObjectRepresentation repr = restfulResponse.getEntity();

        final JsonRepresentation membersList = repr.getMembers();
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

    public void singleMember_specified_by_criteria() throws Exception {

        final String href = givenHrefToService("WrapperValuedEntities");

        final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s]", "list", Rel.DETAILS.getName());
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final DomainObjectRepresentation repr = restfulResponse.getEntity();

        final JsonRepresentation membersList = repr.getMembers();
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

    public void toMultipleMembersDetails() throws Exception {

        final String href = givenHrefToService("WrapperValuedEntities");

        final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s],members[%s].links[rel=%s]", "list", Rel.DETAILS.getName(), "newEntity", Rel.DETAILS.getName());
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final DomainObjectRepresentation repr = restfulResponse.getEntity();

        final JsonRepresentation membersList = repr.getMembers();
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

    public static JsonRepresentation givenAction(RestfulClient client, final String serviceId, final String actionId) throws JsonParseException, JsonMappingException, IOException {
        final String href = givenHrefToService(client, serviceId);

        final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s]", actionId, Rel.DETAILS.getName());
        final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
        final DomainObjectRepresentation repr = restfulResponse.getEntity();

        final JsonRepresentation actionLinkRepr = repr.getAction(actionId);
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

        clientRequestConfigurer.setHttpMethod(getHttpMethod());

        clientRequestConfigurer.configureArgs(requestArgs);

        final RestfulRequest restfulRequest = new RestfulRequest(clientRequestConfigurer);
        return restfulRequest.executeT();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.executeT()

        RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/" +
                oid +
                "/collections/visibleAndEditableCollection");

        // when
        RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();

        assertThat(restfulResponse.getStatus(), is(statusCode1));
    }

}
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.