use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class ValidComparisonVisitorTest method testMulNode.
@Test
public void testMulNode() throws ParseException {
String queryString = "1*3*1 == 3";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidComparisonVisitor.check(script);
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class ValidComparisonVisitorTest method testInvalidNR.
@Test(expected = DatawaveFatalQueryException.class)
public void testInvalidNR() throws ParseException {
String queryString = "'BAR' !~ 'foo'";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidComparisonVisitor.check(script);
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class ValidComparisonVisitorTest method testInvalidEQ.
@Test(expected = DatawaveFatalQueryException.class)
public void testInvalidEQ() throws ParseException {
String queryString = "'BAR' == 1";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidComparisonVisitor.check(script);
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class ValidComparisonVisitorTest method testInvalidLT.
@Test(expected = DatawaveFatalQueryException.class)
public void testInvalidLT() throws ParseException {
String queryString = "'BAR' < 1";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidComparisonVisitor.check(script);
}
use of org.apache.commons.jexl3.parser.ASTJexlScript in project datawave by NationalSecurityAgency.
the class ValidComparisonVisitorTest method testSubNode.
@Test
public void testSubNode() throws ParseException {
String queryString = "5-1-1 == 3";
ASTJexlScript script = JexlASTHelper.parseJexlQuery(queryString);
ValidComparisonVisitor.check(script);
}
Aggregations