Search in sources :

Example 51 with XPathAxis

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

the class FunctionsXMarkTest method testElementAttributeInReturn.

/**
 * Test <element attribute=""/> in return statement.
 *
 * @throws SirixXPathException
 */
@Ignore
@Test
public final void testElementAttributeInReturn() throws SirixXPathException {
    final String query = "for $b in /site/open_auctions/open_auction/bidder[personref[@person=\"person2436\"]]/increase return <element attribute=\"{$b/text()}\"/>";
    final String result = "<element attribute=\"12.00\"/><element attribute=\"12.00\"/>";
    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 52 with XPathAxis

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

the class FunctionsXMarkTest method testFloor.

/**
 * Test function floor().
 *
 * @throws SirixXPathException
 */
@Ignore
@Test
public final void testFloor() throws SirixXPathException {
    final String query = "fn:floor(5.7)";
    final String result = "5";
    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 53 with XPathAxis

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

the class FunctionsXMarkTest method testExists.

/**
 * Test function exists().
 *
 * @throws SirixXPathException
 */
@Ignore
@Test
public final void testExists() throws SirixXPathException {
    final String query = "fn:exists( ('a', 'b', 'c') )";
    final String result = "true";
    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 54 with XPathAxis

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

the class FunctionsXMarkTest method testBoolean.

/**
 * Test function boolean().
 *
 * @throws SirixXPathException
 */
@Ignore
@Test
public final void testBoolean() throws SirixXPathException {
    final String query = "fn:boolean(0)";
    final String result = "false";
    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 55 with XPathAxis

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

the class FunctionsXMarkTest method testOneOrMore.

/**
 * Test function one-or-more().
 *
 * @throws SirixXPathException
 */
@Ignore
@Test
public final void testOneOrMore() throws SirixXPathException {
    final String query = "fn:one-or-more(\"a\")";
    final String result = "a";
    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)

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