Class XPathDocOrderTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class XPathDocOrderTest
    extends AbstractQueryTest
    Tests if the repository supports document order in XPath. The tests will check the repository descriptor Repository.QUERY_XPATH_DOC_ORDER first and throw a NotExecutableException if the descriptor is not present.

    This is a level 1 test, therefore does not write content to the workspace. The tests require the following content in the default workspace:

    At least three nodes under the AbstractJCRTest.testRoot.

    • Constructor Detail

      • XPathDocOrderTest

        public XPathDocOrderTest()
    • Method Detail

      • setUp

        protected void setUp()
                      throws Exception
        Description copied from class: AbstractQueryTest
        Set-up the configuration values used for the test. Per default retrieves a session, configures testRoot, and nodetype and checks if the query language for the current language is available.
        Overrides:
        setUp in class AbstractQueryTest
        Throws:
        Exception
      • testDocOrderPositionFunction

        public void testDocOrderPositionFunction()
                                          throws Exception
        Tests the position() function.

        For configuration description see XPathDocOrderTest.

        Throws:
        Exception
      • testDocOrderPositionIndex

        public void testDocOrderPositionIndex()
                                       throws Exception
        Tests if position index and document order on child axis returns the correct node.

        For configuration description see XPathDocOrderTest.

        Throws:
        Exception
      • testDocOrderLastFunction

        public void testDocOrderLastFunction()
                                      throws Exception
        Tests the last() function.

        For configuration description see XPathDocOrderTest.

        Throws:
        Exception
      • testDocOrderFirstFunction

        public void testDocOrderFirstFunction()
                                       throws Exception
        Tests the first() function.

        For configuration description see XPathDocOrderTest.

        Throws:
        Exception