@Test public void forListWithSingleCriteriaMatchingOne() throws JsonParseException, JsonMappingException, IOException { final JsonRepresentation representation = jsonRepresentation.getRepresentation("anotherSubMap.aListOfLinks[rel=aRel]"); assertThat(representation.isLink(), is(true)); assertThat(representation.asLink().getHref(), is("http://foo/bar")); }
@Test public void forListWithSingleCriteriaMatchingOne() throws IOException { final JsonRepresentation representation = jsonRepresentation.getRepresentation("anotherSubMap.aListOfLinks[rel=aRel]"); assertThat(representation.isLink(), is(true)); assertThat(representation.asLink().getHref(), is("http://foo/bar")); }
@Test public void forListWithMultipleCriteriaMatchingOne() throws IOException { final JsonRepresentation representation = jsonRepresentation.getRepresentation("anotherSubMap.aListOfLinks[rel=multiRel data=someData]"); assertThat(representation.isLink(), is(true)); assertThat(representation.asLink().getHref(), is("http://foo/bar/multiRel1")); }
@Test public void forListWithMultipleCriteriaMatchingOne() throws JsonParseException, JsonMappingException, IOException { final JsonRepresentation representation = jsonRepresentation.getRepresentation("anotherSubMap.aListOfLinks[rel=multiRel data=someData]"); assertThat(representation.isLink(), is(true)); assertThat(representation.asLink().getHref(), is("http://foo/bar/multiRel1")); }
throw new ExpectedMapRepresentingLinkException(); final JsonRepresentation argLink = representation.asLink(); final String oidFromHref = UrlParserUtils.oidFromLink(argLink); if (oidFromHref == null) {