DATAREST-1341 - Upgrade to Spring HATEOAS 1.0.

This commit is contained in:
Greg Turnquist
2018-02-26 11:53:22 -06:00
committed by Oliver Drotbohm
parent a05d6a2a90
commit af6f55a92c
16 changed files with 42 additions and 48 deletions

View File

@@ -83,7 +83,7 @@ public class ResourceTester {
private final Link assertHasLinkMatching(String rel, Matcher<String> hrefMatcher) {
Link link = resource.getLink(rel);
Link link = resource.getRequiredLink(rel);
assertThat("Expected link with rel '" + rel + "' but didn't find it in " + resource.getLinks(), link,
is(notNullValue()));

View File

@@ -99,7 +99,7 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt
assertThat(links.hasLink("firstname")).isTrue();
Link firstnameLink = links.getLink("firstname");
Link firstnameLink = links.getLink("firstname").orElse(null);
assertThat(firstnameLink.isTemplated()).isTrue();
assertThat(firstnameLink.getVariableNames()).contains("page", "size");
}

View File

@@ -68,7 +68,7 @@ public class PersistentEntityResourceAssemblerIntegrationTests extends AbstractC
Links links = new Links(resource.getLinks());
assertThat(links).hasSize(2);
assertThat(links.getLink("self").getVariables()).isEmpty();
assertThat(links.getLink("user").getVariableNames()).contains("projection");
assertThat(links.getLink("self").orElseThrow(() -> new RuntimeException("Unable to find 'self' link")).getVariables()).isEmpty();
assertThat(links.getLink("user").orElseThrow(() -> new RuntimeException("Unable to find 'user' link")).getVariableNames()).contains("projection");
}
}