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

Examples of org.apache.isis.viewer.json.applib.homepage.HomePageRepresentation


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

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

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

        assertThat(repr.getSelf(), isLink(client).httpMethod(HttpMethod.GET));
        assertThat(repr.getUser(), isLink(client).httpMethod(HttpMethod.GET));
        assertThat(repr.getServices(), isLink(client).httpMethod(HttpMethod.GET));
        assertThat(repr.getVersion(), isLink(client).httpMethod(HttpMethod.GET));

        assertThat(repr.getLinks(), isArray());
        assertThat(repr.getExtensions(), isMap());
    }
View Full Code Here


    }

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

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

    }

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

        // when, then
        assertThat(repr.getServices(), isLink(client).returning(HttpStatusCode.OK));
        assertThat(repr.getUser(), isLink(client).returning(HttpStatusCode.OK));
        assertThat(repr.getVersion(), isLink(client).returning(HttpStatusCode.OK));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.json.applib.homepage.HomePageRepresentation

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.