Class XQueryTest


  • public class XQueryTest
    extends Object
    Unit tests for XQuery.
    Author:
    Richard "Shred" Körber
    • Constructor Summary

      Constructors 
      Constructor Description
      XQueryTest()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void allValueTest()
      Does XQuery.allValue(String) return the text contents of the matching elements, recursively?
      void attrEmptyTest()
      Does XQuery.attr() return an empty map of attributes when there are none?
      void attrManyTest()
      Does XQuery.attr() return a map of multiple attributes?
      void attrTest()
      Does XQuery.attr() return a map of attributes?
      void cdataTest()
      Are CDATA elements read as text?
      void existsTest()
      Does XQuery.exists(String) return a correct answer.
      void getMultipleFailTest()
      Does XQuery.get(String) throw an exception if multiple elements are found?
      void getNoneFailTest()
      Does XQuery.get(String) throw an exception if there is no such element?
      void getTest()
      Does XQuery.get(String) return a single element?
      void init()
      Sets up a new XQuery instance.
      void noCommentTest()
      Are comments ignored?
      void parentOfRootTest()
      Does XQuery.parent() return empty on root?
      void parentTest()
      Does XQuery.parent() return the correct parent node?
      void parserFailTest()
      Test parser error on bad XML.
      void parserReaderTest()
      Test Reader based parser.
      void parserStringTest()
      Test String based parser.
      void rootOfRootTest()
      Does XQuery.parent() return empty on root?
      void rootTest()
      Does XQuery.parent() return the correct parent node?
      void selectFailTest()
      Does XQuery.select(String) fail on bad XPath?
      void selectTest()
      Does XQuery.select(String) return the correct elements? Does XQuery.text() return the text content?
      void siblingTest()
      Does XQuery.previousSibling() and XQuery.nextSibling() return the correct siblings?
      void streamTest()
      Does the XQuery.stream() of the root XQuery return the root element?
      void subStreamTest()
      Does the XQuery.stream() of a subelement return the child elements of that element?
      void value3Test()
      Does XQuery.select(String) and XQuery.allText() return the text contents of the entire subtree?
      void valueNonRecursiveTest()
      Is XQuery.value(String) non-recursive, i.e.
      void valueTest()
      Does XQuery.value(String) return the text contents of the matching elements?