Example usage for org.apache.commons.jxpath Pointer toString

List of usage examples for org.apache.commons.jxpath Pointer toString

Introduction

In this page you can find the example usage for org.apache.commons.jxpath Pointer toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:org.firesoa.common.jxpath.JXPathTestCase.java

protected void assertXPathPointer(JXPathContext ctx, String xpath, String expected) {
    ctx.setLenient(false);//  w  w w  .  j  ava2s  .co  m
    Pointer pointer = ctx.getPointer(xpath);
    String actual = pointer.toString();
    assertEquals("Evaluating pointer <" + xpath + ">", expected, actual);
}

From source file:org.firesoa.common.jxpath.JXPathTestCase.java

protected void assertXPathPointerLenient(JXPathContext ctx, String xpath, String expected) {
    ctx.setLenient(true);/*from   w ww. ja  v  a  2  s. co m*/
    Pointer pointer = ctx.getPointer(xpath);
    String actual = pointer.toString();
    assertEquals("Evaluating pointer <" + xpath + ">", expected, actual);
}

From source file:org.firesoa.common.jxpath.JXPathTestCase.java

protected void assertXPathPointerIterator(JXPathContext ctx, String xpath, Collection expected) {
    Collection actual;/*from  w  ww.  j a  v  a 2  s  .c  om*/
    if (expected instanceof List) {
        actual = new ArrayList();
    } else {
        actual = new HashSet();
    }
    Iterator it = ctx.iteratePointers(xpath);
    while (it.hasNext()) {
        Pointer pointer = (Pointer) it.next();
        actual.add(pointer.toString());
    }
    assertEquals("Evaluating pointer iterator <" + xpath + ">", expected, actual);
}