Search in sources :

Example 6 with XPathExpression

use of net.sf.saxon.sxpath.XPathExpression in project checkstyle by checkstyle.

the class XpathFilterElementTest method testEqualsAndHashCode.

@Test
public void testEqualsAndHashCode() throws Exception {
    final XPathEvaluator xpathEvaluator = new XPathEvaluator(Configuration.newConfiguration());
    final EqualsVerifierReport ev = EqualsVerifier.forClass(XpathFilterElement.class).withPrefabValues(XPathExpression.class, xpathEvaluator.createExpression("//METHOD_DEF"), xpathEvaluator.createExpression("//VARIABLE_DEF")).usingGetClass().withIgnoredFields("fileRegexp", "checkRegexp", "messageRegexp", "xpathExpression").report();
    assertWithMessage("Error: " + ev.getMessage()).that(ev.isSuccessful()).isTrue();
}
Also used : XPathExpression(net.sf.saxon.sxpath.XPathExpression) XPathEvaluator(net.sf.saxon.sxpath.XPathEvaluator) EqualsVerifierReport(nl.jqno.equalsverifier.EqualsVerifierReport) Test(org.junit.jupiter.api.Test)

Aggregations

XPathExpression (net.sf.saxon.sxpath.XPathExpression)6 XPathEvaluator (net.sf.saxon.sxpath.XPathEvaluator)5 Item (net.sf.saxon.om.Item)4 XPathDynamicContext (net.sf.saxon.sxpath.XPathDynamicContext)4 XPathException (net.sf.saxon.trans.XPathException)4 XMLColumn (org.teiid.query.sql.lang.XMLTable.XMLColumn)2 CheckstyleException (com.puppycrawl.tools.checkstyle.api.CheckstyleException)1 AbstractNode (com.puppycrawl.tools.checkstyle.xpath.AbstractNode)1 RootNode (com.puppycrawl.tools.checkstyle.xpath.RootNode)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Source (javax.xml.transform.Source)1 StAXSource (javax.xml.transform.stax.StAXSource)1 StreamSource (javax.xml.transform.stream.StreamSource)1 Configuration (net.sf.saxon.Configuration)1 NodeInfo (net.sf.saxon.om.NodeInfo)1 SequenceIterator (net.sf.saxon.om.SequenceIterator)1 EqualsVerifierReport (nl.jqno.equalsverifier.EqualsVerifierReport)1 Test (org.junit.jupiter.api.Test)1