use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class RootNegationCheckVisitorTest method testWrappedNegatedMarker.
@Test
public void testWrappedNegatedMarker() throws ParseException {
ASTJexlScript script = JexlASTHelper.parseJexlQuery("!((_Delayed_ = true) && (FOO == 'bar' && FOO == 'baz'))");
Assert.assertTrue(RootNegationCheckVisitor.hasTopLevelNegation(script));
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class RootNegationCheckVisitorTest method testNegatedMarkerOneLeaf.
@Test
public void testNegatedMarkerOneLeaf() throws ParseException {
ASTJexlScript script = JexlASTHelper.parseJexlQuery("((_Delayed_ = true) && !(FOO != 'bar' && FOO == 'baz'))");
Assert.assertFalse(RootNegationCheckVisitor.hasTopLevelNegation(script));
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class RootNegationCheckVisitorTest method testWrappedNegation.
@Test
public void testWrappedNegation() throws ParseException {
ASTJexlScript script = JexlASTHelper.parseJexlQuery("!(FOO == 'bar')");
Assert.assertTrue(RootNegationCheckVisitor.hasTopLevelNegation(script));
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class RootNegationCheckVisitorTest method testNegatedOneLeafAnd.
@Test
public void testNegatedOneLeafAnd() throws ParseException {
ASTJexlScript script = JexlASTHelper.parseJexlQuery("!(FOO != 'bar' && FOO == 'baz')");
Assert.assertFalse(RootNegationCheckVisitor.hasTopLevelNegation(script));
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class RootNegationCheckVisitorTest method testNegatedAnd.
@Test
public void testNegatedAnd() throws ParseException {
ASTJexlScript script = JexlASTHelper.parseJexlQuery("!(FOO == 'bar' && FOO == 'baz')");
Assert.assertTrue(RootNegationCheckVisitor.hasTopLevelNegation(script));
}
Aggregations