Examples of LinkRepresentation


Examples of org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation

        // given
        final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findByIdNotIdempotent");
        final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);

        final LinkRepresentation invokeLink = actionRepr.getInvoke();
        final JsonRepresentation args =invokeLink.getArguments();
       
        // when
        args.mapPut("id.value", 1);

        // when
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation

        // given
        final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
        final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);

        final LinkRepresentation invokeLink = actionRepr.getInvoke();

        assertThat(invokeLink, isLink(client)
                                    .rel(Rel.INVOKE)
                                    .httpMethod(RestfulHttpMethod.GET)
                                    .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
                                    .build());
       
        JsonRepresentation args =invokeLink.getArguments();
        assertThat(args.size(), is(2));
        assertThat(args, RestfulMatchers.mapHas("from"));
        assertThat(args, RestfulMatchers.mapHas("to"));
       
        // when
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.