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

Examples of org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.HasLinkToSelf


                description.appendText("links to self");
            }

            @Override
            public boolean matchesSafely(final T item) {
                final HasLinkToSelf initialRepr = (HasLinkToSelf) item; // no easy
                                                                    // way to do
                                                                    // this with
                                                                    // Hamcrest
                // when
                try {
                    final RestfulResponse<T> followedResp = client.followT(initialRepr.getSelf());

                    // then
                    final T repr2 = followedResp.getEntity();
                    final HasLinkToSelf repr2AsLinksToSelf = (HasLinkToSelf) repr2;
                    return initialRepr.getSelf().equals(repr2AsLinksToSelf.getSelf());
                } catch (final Exception e) {
                    throw new RuntimeException(e);
                }
            }
        };
View Full Code Here


                description.appendText("links to self");
            }

            @Override
            public boolean matchesSafely(final T item) {
                final HasLinkToSelf initialRepr = (HasLinkToSelf) item; // no easy
                                                                    // way to do
                                                                    // this with
                                                                    // Hamcrest
                // when
                try {
                    final RestfulResponse<T> followedResp = client.followT(initialRepr.getSelf());

                    // then
                    final T repr2 = followedResp.getEntity();
                    final HasLinkToSelf repr2AsLinksToSelf = (HasLinkToSelf) repr2;
                    return initialRepr.getSelf().equals(repr2AsLinksToSelf.getSelf());
                } catch (final Exception e) {
                    throw new RuntimeException(e);
                }
            }
        };
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.HasLinkToSelf

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.