Package org.apache.isis.viewer.json.applib.version

Examples of org.apache.isis.viewer.json.applib.version.VersionRepresentation


        assertThat(restfulResponse.getStatus().getFamily(), is(Family.SUCCESSFUL));

        // then
        assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));

        final VersionRepresentation repr = restfulResponse.getEntity();
        assertThat(repr, is(not(nullValue())));
        assertThat(repr, isMap());

        assertThat(repr.getSelf(), isLink().httpMethod(HttpMethod.GET));

        assertThat(repr.getString("specVersion"), is("0.52"));
        assertThat(repr.getString("implVersion"), is(not(nullValue())));

        final JsonRepresentation optionalCapbilitiesRepr = repr.getOptionalCapabilities();
        assertThat(optionalCapbilitiesRepr, isMap());

        assertThat(optionalCapbilitiesRepr.getString("concurrencyChecking"), is("no"));
        assertThat(optionalCapbilitiesRepr.getString("transientObjects"), is("yes"));
        assertThat(optionalCapbilitiesRepr.getString("deleteObjects"), is("no"));
        assertThat(optionalCapbilitiesRepr.getString("simpleArguments"), is("no"));
        assertThat(optionalCapbilitiesRepr.getString("partialArguments"), is("no"));
        assertThat(optionalCapbilitiesRepr.getString("followLinks"), is("yes"));
        assertThat(optionalCapbilitiesRepr.getString("validateOnly"), is("no"));
        assertThat(optionalCapbilitiesRepr.getString("pagination"), is("no"));
        assertThat(optionalCapbilitiesRepr.getString("sorting"), is("no"));
        assertThat(optionalCapbilitiesRepr.getString("domainModel"), is("rich"));

        assertThat(repr.getLinks(), isArray());
        assertThat(repr.getExtensions(), is(not(nullValue())));
    }
View Full Code Here


    }

    @Test
    public void selfIsFollowable() throws Exception {
        // given
        final VersionRepresentation repr = givenRepresentation();

        // when, then
        assertThat(repr, isFollowableLinkToSelf(client));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.json.applib.version.VersionRepresentation

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.