use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.
the class FunctionsXMarkTest method testCount.
/**
* Test function count().
*
* @throws SirixXPathException
*/
@Ignore
@Test
public final void testCount() throws SirixXPathException {
final String query = "fn:count(for $i in /site/closed_auctions/closed_auction[price/text() >= 40] return $i/price)";
final String result = "670";
XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.
the class FunctionsXMarkTest method testLast.
/**
* Test function last().
*
* @throws SirixXPathException
*/
@Ignore
@Test
public final void testLast() throws SirixXPathException {
final String query = "/site/open_auctions/open_auction/reserve[last()]";
final String result = "<reserve>539.66</reserve>";
XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.
the class FunctionsXMarkTest method testMin.
/**
* Test function min().
*
* @throws SirixXPathException
*/
@Ignore
@Test
public final void testMin() throws SirixXPathException {
final String query = "fn:min(for $i in /site/open_auctions/open_auction return $i/reserve/text())";
final String result = "0.43";
XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.
the class FunctionsXMarkTest method testNode.
/**
* Test function node().
*
* @throws SirixXPathException
*/
@Ignore
@Test
public final void testNode() throws SirixXPathException {
final String query = "for $b in /site/people/person[@id=\"person1\"] return $b/name/node()";
final String result = "Keung Yetim";
XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
use of org.sirix.service.xml.xpath.XPathAxis in project sirix by sirixdb.
the class FunctionsXMarkTest method testZeroOrOne.
/**
* Test function zero-or-one(). alternative query: zero-or-one('a') -> result: a
*
* @throws SirixXPathException
*/
@Ignore
@Test
public final void testZeroOrOne() throws SirixXPathException {
final String query = " for $i in /site/open_auctions/open_auction return zero-or-one($i/reserve[text()=\"20.54\"]/text())";
final String result = "20.54";
XPathStringChecker.testIAxisConventions(new XPathAxis(holder.getReader(), query), new String[] { result });
}
Aggregations