Search in sources :

Example 56 with XPathAxis

use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.

the class FunctionsXMarkTest method testNumber.

/**
 * Test function number().
 *
 * @throws SirixXPathException
 */
@Ignore
@Test
public final void testNumber() throws SirixXPathException {
    final String query = "/site/open_auctions/open_auction/bidder[personref[@person=\"person2436\"]]/increase/number()";
    final String result = "12 12";
    XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
Also used : XPathAxis(org.sirix.service.xml.xpath.XPathAxis) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 57 with XPathAxis

use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.

the class FunctionsXMarkTest method testContains.

/**
 * Test function contains().
 *
 * @throws SirixXPathException
 */
@Ignore
@Test
public final void testContains() throws SirixXPathException {
    final String query = "/site/regions/*/item[contains(description,\"gold\")]/location[text()=\"El Salvador\"]";
    final String result = "<location>El Salvador</location>";
    XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
Also used : XPathAxis(org.sirix.service.xml.xpath.XPathAxis) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 58 with XPathAxis

use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.

the class XMarkBenchTest method xMarkTest_Q1.

@Test
public void xMarkTest_Q1() throws SirixXPathException {
    String query = xmbq.getQuery(1, FACTOR);
    String result = xmbq.getResult(1, FACTOR);
    XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
Also used : XPathAxis(org.sirix.service.xml.xpath.XPathAxis) Test(org.junit.Test)

Example 59 with XPathAxis

use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.

the class XMarkBenchTest method xMarkTest_Q7.

@Test
public void xMarkTest_Q7() throws SirixXPathException {
    String query = xmbq.getQuery(7, FACTOR);
    String result = xmbq.getResult(7, FACTOR);
    XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
Also used : XPathAxis(org.sirix.service.xml.xpath.XPathAxis) Test(org.junit.Test)

Example 60 with XPathAxis

use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.

the class XMarkBenchTest method xMarkTest_Q6.

@Test
public void xMarkTest_Q6() throws SirixXPathException {
    String query = xmbq.getQuery(6, FACTOR);
    String result = xmbq.getResult(6, FACTOR);
    XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
Also used : XPathAxis(org.sirix.service.xml.xpath.XPathAxis) Test(org.junit.Test)

Aggregations

XPathAxis (org.sirix.service.xml.xpath.XPathAxis)67 Test (org.junit.Test)62 Ignore (org.junit.Ignore)27 AbsAxisTest (org.sirix.axis.AbsAxisTest)18 SirixXPathException (org.sirix.exception.SirixXPathException)12 AbstractAxis (org.sirix.service.xml.xpath.AbstractAxis)12 Axis (org.sirix.api.Axis)6 IOException (java.io.IOException)3 WebApplicationException (javax.ws.rs.WebApplicationException)3 SessionConfiguration (org.sirix.access.conf.SessionConfiguration)3 Database (org.sirix.api.Database)3 NodeReadTrx (org.sirix.api.NodeReadTrx)3 Session (org.sirix.api.Session)3 SirixException (org.sirix.exception.SirixException)3 XPathError (org.sirix.service.xml.xpath.XPathError)3 XdmNodeReadTrx (org.sirix.api.XdmNodeReadTrx)2 LinkedList (java.util.LinkedList)1 StringTokenizer (java.util.StringTokenizer)1 QName (javax.xml.namespace.QName)1 XMLEvent (javax.xml.stream.events.XMLEvent)1