Package com.gistlabs.mechanize.document.json.node.impl

Examples of com.gistlabs.mechanize.document.json.node.impl.ObjectNodeImpl.buildNodeSelector()


public class PseudoNodeSelectorTest {

  protected NodeSelector<JsonNode> build(final String json) throws JSONException {
    ObjectNodeImpl node = new ObjectNodeImpl(new JSONObject(json));
    return node.buildNodeSelector();
  }

  @Test
  public void testPseudoFirstOfType() throws Exception {
    NodeSelector<JsonNode> selector = build("{ \"a\" : 2, \"b\" : { \"x\" : \"y\" }, \"results\" : [ { \"a\" : 1 }, { \"a\" : 2 } ] }");
View Full Code Here


public class AttributeNodeSelectorTest {

  protected NodeSelector<JsonNode> build(final String json) throws JSONException {
    ObjectNodeImpl node = new ObjectNodeImpl(new JSONObject(json));
    return node.buildNodeSelector();
  }

  @Test
  public void testAttributeAsNode() throws Exception {
    NodeSelector<JsonNode> selector = build("{ \"a\" : 2, \"b\" : { \"x\" : \"y\" }, \"results\" : [ { \"a\" : 1 }, { \"b\" : 2, \"c\" : 3 } ] }");
View Full Code Here

public class NodeSelectorTest {

  protected NodeSelector<JsonNode> build(final String json) throws JSONException {
    ObjectNodeImpl node = new ObjectNodeImpl(new JSONObject(json));
    return node.buildNodeSelector();
  }

  @Test
  public void testStar() throws Exception {
    NodeSelector<JsonNode> selector = build("{ \"a\" : 2, \"b\" : { \"x\" : \"y\" }, \"results\" : [ { \"a\" : 1 }, { \"b\" : 2 } ] }");
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.