Package com.gistlabs.mechanize.document.json.hypermedia

Examples of com.gistlabs.mechanize.document.json.hypermedia.JsonLink.uri()


  @Test
  public void setVariableProgramatically() {
    JsonNode node = json.find("trivial-template");
    JsonLink link = new JsonLink(node);
    link.set("a", "aaa");
    assertEquals("http://example.com/aaa", link.uri());
  }
 
  @Test
  public void setAllVariableProgramatically() {
    JsonNode node = json.find("template-path-segments");
View Full Code Here


    JsonLink link = new JsonLink(node);
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("a", "aaa");
    variables.put("b", "bbb");
    link.setAll(variables);
    assertEquals("http://example.com/aaa/bbb/baz", link.uri());
  }
 
  @Test
  public void debug() {
//    JsonNode keys = json.<JsonNode>find("template-keys").getChild("keys");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.