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

Examples of org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.mapPut()


                                    .build());
       
        // when
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("from", JsonRepresentation.newMap());
        args.mapPut("to.value", (Integer)null);

        final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
       
        // then
        then(restfulResponse);
View Full Code Here


    @Test
    public void usingResourceProxy_whenExplicitSetToNull() throws Exception {

        // given, when
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("from", JsonRepresentation.newMap());
        args.mapPut("to.value", (Integer)null);

        Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
View Full Code Here

    public void usingResourceProxy_whenExplicitSetToNull() throws Exception {

        // given, when
        JsonRepresentation args = JsonRepresentation.newMap();
        args.mapPut("from", JsonRepresentation.newMap());
        args.mapPut("to.value", (Integer)null);

        Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
        RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
       
        // then
View Full Code Here

        assertThat(args.size(), is(2));
        assertThat(args, RestfulMatchers.mapHas("from"));
        assertThat(args, RestfulMatchers.mapHas("to"));
       
        // when
        args.mapPut("from.value", -1);
        args.mapPut("to.value", 2);

        final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
       
        // then
View Full Code Here

        assertThat(args, RestfulMatchers.mapHas("from"));
        assertThat(args, RestfulMatchers.mapHas("to"));
       
        // when
        args.mapPut("from.value", -1);
        args.mapPut("to.value", 2);

        final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
       
        // then
        thenResponseIsAValidationError(restfulResponse);
View Full Code Here

        final JsonRepresentation args = invokeLink.getArguments();
        assertThat(args.size(), is(3));
       
        // when query the 'contains' action passing in the entity
        // (for a range where the entity is contained in the range)
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 3);
       
        RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
View Full Code Here

        assertThat(args.size(), is(3));
       
        // when query the 'contains' action passing in the entity
        // (for a range where the entity is contained in the range)
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 3);
       
        RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
View Full Code Here

       
        // when query the 'contains' action passing in the entity
        // (for a range where the entity is contained in the range)
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 0);
        args.mapPut("to.value", 3);
       
        RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);

        // then
        thenResponseIsScalarValueOf(restfulResponse, true);
View Full Code Here

        thenResponseIsScalarValueOf(restfulResponse, true);
       
       
        // and when query the 'contains' action for a different range which does not
        // contain the entity
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 3);
        args.mapPut("to.values", 5);
       
        restfulResponse = client.followT(invokeLink, args);
View Full Code Here

       
       
        // and when query the 'contains' action for a different range which does not
        // contain the entity
        args.mapPut("searchFor.value", firstEntityLink);
        args.mapPut("from.value", 3);
        args.mapPut("to.values", 5);
       
        restfulResponse = client.followT(invokeLink, args);

        // then
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.