Examples of executeT()


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

        // given
        RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64");
        request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());

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

        assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
    }

    @Test
View Full Code Here

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

        // given
        RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/actions/invisibleAction");

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

        assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
    }

}
View Full Code Here

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

        // given
        final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "");
        request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());

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

        // then
        assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
    }
View Full Code Here

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.andParam("action", "list"));
        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.andParam("action", "list"), "newEntity", Rel.DETAILS.andParam("action", "newEntity"));
        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()

        // given
        RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/55/properties/anInt");
        request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());

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

        assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
    }

    @Test
View Full Code Here

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

        // given
        RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/properties/invisibleProperty");

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

        assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
    }

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