use of org.drools.drl.parser.lang.DRLParser in project drools by kiegroup.
the class DRLContextTest method testCheckLHSLocationDetermination_INSIDE_CONDITION_OPERATOR61.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_INSIDE_CONDITION_OPERATOR61() {
String input = "rule MyRule \n" + " when \n" + " Class ( property > 0 && \n" + " ";
DRLParser parser = getParser(input);
parser.enableEditorInterface();
try {
parser.compilationUnit();
} catch (Exception ex) {
}
assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR, getLastIntegerValue(parser.getEditorInterface().get(0).getContent()));
}
use of org.drools.drl.parser.lang.DRLParser in project drools by kiegroup.
the class DRLContextTest method testCheckLHSLocationDetermination_INSIDE_CONDITION_ARGUMENT12.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_INSIDE_CONDITION_ARGUMENT12() {
String input = "rule MyRule \n" + " when \n" + " Class ( property in ";
DRLParser parser = getParser(input);
parser.enableEditorInterface();
try {
parser.compilationUnit();
} catch (Exception ex) {
}
assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT, getLastIntegerValue(parser.getEditorInterface().get(0).getContent()));
}
use of org.drools.drl.parser.lang.DRLParser in project drools by kiegroup.
the class DRLContextTest method testCheckLHSLocationDetermination_BEGIN_OF_CONDITION68.
/**
* NESTED FROM
*/
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION68() {
String input = "rule MyRule \n" + " when \n" + " ArrayList(size > 50) from collect( Person( disabled == \"yes\", income > 100000 ) ";
DRLParser parser = getParser(input);
parser.enableEditorInterface();
try {
parser.compilationUnit();
} catch (Exception ex) {
}
assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION, getLastIntegerValue(parser.getEditorInterface().get(0).getContent()));
}
use of org.drools.drl.parser.lang.DRLParser in project drools by kiegroup.
the class DRLContextTest method testCheckLHSLocationDetermination_INSIDE_CONDITION_OPERATOR9.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_INSIDE_CONDITION_OPERATOR9() {
String input = "rule MyRule \n" + " when \n" + " Class ( name1 : property1, \n" + " name : property ";
DRLParser parser = getParser(input);
parser.enableEditorInterface();
try {
parser.compilationUnit();
} catch (Exception ex) {
}
assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR, getLastIntegerValue(parser.getEditorInterface().get(0).getContent()));
}
use of org.drools.drl.parser.lang.DRLParser in project drools by kiegroup.
the class DRLContextTest method testCheckLHSLocationDetermination_FROM5.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_FROM5() {
String input = "rule MyRule \n" + " when \n" + " ArrayList(size > 50) from collect( Person( disabled == \"yes\", income > 100000 ) from ";
DRLParser parser = getParser(input);
parser.enableEditorInterface();
try {
parser.compilationUnit();
} catch (Exception ex) {
}
assertEquals(Location.LOCATION_LHS_FROM, getLastIntegerValue(parser.getEditorInterface().get(0).getContent()));
}
Aggregations