[nobug] Added WTP DOM Xpath 2.0 tests
diff --git a/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/AllPsychoPathTests.java b/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/AllPsychoPathTests.java index 2b22d02..f38b0b0 100644 --- a/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/AllPsychoPathTests.java +++ b/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/AllPsychoPathTests.java
@@ -33,6 +33,7 @@ suite.addTestSuite(TestSumAvg.class); suite.addTestSuite(XPathDecimalFormatTest.class); suite.addTestSuite(LiteralUtilsTest.class); + suite.addTestSuite(TestWTPDOMXPath2.class); //$JUnit-END$ return suite; }
diff --git a/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/TestWTPDOMXPath2.java b/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/TestWTPDOMXPath2.java index d5e29ac..108b54d 100644 --- a/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/TestWTPDOMXPath2.java +++ b/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/TestWTPDOMXPath2.java
@@ -1905,85 +1905,6 @@ actual); } - - // Evaluates unabbreviated syntax - child::node() - select all children of - // the context node. - public void test_unabbreviatedSyntax_4() throws Exception { - String inputFile = "/TestSources/works-mod.xml"; - String xqFile = "/Queries/XQuery/Expressions/PathExpr/UnabbrAxes/unabbreviatedSyntax-4.xq"; - String resultFile = "/ExpectedTestResults/Expressions/PathExpr/UnabbrAxes/unabbreviatedSyntax-4.txt"; - String expectedResult = "<result>" + getExpectedResult(resultFile) - + "</result>"; - URL fileURL = bundle.getEntry(inputFile); - domDoc = load(fileURL); - - // Get XML Schema Information for the Document - XSModel schema = null; - - DynamicContext dc = setupDynamicContext(schema); - - String xpath = extractXPathExpression(xqFile, inputFile); - String actual = null; - try { - XPath path = compileXPath(dc, xpath); - - Evaluator eval = new DefaultEvaluator(dc, domDoc); - ResultSequence rs = eval.evaluate(path); - - actual = "<result>" + buildXMLResultString(rs) + "</result>"; - - } catch (XPathParserException ex) { - actual = ex.code(); - } catch (StaticError ex) { - actual = ex.code(); - } catch (DynamicError ex) { - actual = ex.code(); - } - - assertXMLEqual("XPath Result Error " + xqFile + ":", expectedResult, - actual); - - } - - // Evaluates unabbreviated syntax - child::node() - select all children of - // the context node. - public void test_unabbreviatedSyntax_5() throws Exception { - String inputFile = "/TestSources/works-mod.xml"; - String xqFile = "/Queries/XQuery/Expressions/PathExpr/UnabbrAxes/unabbreviatedSyntax-5.xq"; - String resultFile = "/ExpectedTestResults/Expressions/PathExpr/UnabbrAxes/unabbreviatedSyntax-5.txt"; - String expectedResult = "<result>" + getExpectedResult(resultFile) - + "</result>"; - URL fileURL = bundle.getEntry(inputFile); - domDoc = load(fileURL); - - // Get XML Schema Information for the Document - XSModel schema = null; - - DynamicContext dc = setupDynamicContext(schema); - - String xpath = extractXPathExpression(xqFile, inputFile); - String actual = null; - try { - XPath path = compileXPath(dc, xpath); - - Evaluator eval = new DefaultEvaluator(dc, domDoc); - ResultSequence rs = eval.evaluate(path); - - actual = "<result>" + buildXMLResultString(rs) + "</result>"; - - } catch (XPathParserException ex) { - actual = ex.code(); - } catch (StaticError ex) { - actual = ex.code(); - } catch (DynamicError ex) { - actual = ex.code(); - } - - assertXMLEqual("XPath Result Error " + xqFile + ":", expectedResult, - actual); - - } - // Evaluates unabbreviated syntax - parent::node() - Selects the parent of // the context node.