@Test public void testExpandWithArgumentsMap() { final Affordance affordance = new Affordance("http://localhost/things{?id}", "thing"); Map<String, Object> arguments = new HashMap<String, Object>(); arguments.put("id", 101); assertEquals("http://localhost/things?id=101", affordance.expand(101) .getHref()); }
@Test public void testExpand() { final Affordance affordance = new Affordance("http://localhost/things{/id}", "thing"); assertEquals("http://localhost/things/100", affordance.expand(100) .getHref()); }
beginDiv(); writeAnchor(OptionalAttributes.attr("href", affordance.expand() .getHref()) .and("rel", affordance.getRel()), affordance.getRel());
beginDiv(); writeAnchor(OptionalAttributes.attr("href", affordance.expand() .getHref()) .and("rel", affordance.getRel()), affordance.getRel());
String actionUrl = affordance.expand() .getHref(); beginForm(OptionalAttributes.attr("action", actionUrl)
String actionUrl = affordance.expand() .getHref(); beginForm(OptionalAttributes.attr("action", actionUrl)