use of org.drools.drl.parser.lang.DRLParser in project drools by kiegroup.
the class DRLContextTest method testCheckLHSLocationDetermination_INSIDE_EVAL4.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_INSIDE_EVAL4() {
String input = "rule MyRule \n" + " when \n" + " eval( param.getMetho";
DRLParser parser = getParser(input);
parser.enableEditorInterface();
try {
parser.compilationUnit();
} catch (Exception ex) {
}
assertEquals(Location.LOCATION_LHS_INSIDE_EVAL, 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_ARGUMENT2.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_INSIDE_CONDITION_ARGUMENT2() {
String input = "rule MyRule \n" + " when \n" + " Class ( property== ";
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_CONDITION_NOT2.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_NOT2() {
String input = "rule MyRule \n" + " when \n" + " not Cl";
DRLParser parser = getParser(input);
parser.enableEditorInterface();
try {
parser.compilationUnit();
} catch (Exception ex) {
}
assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_NOT, 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_CONDITION69.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION69() {
String input = "rule MyRule \n" + " when \n" + " ArrayList(size > 50) from collect( Person( disabled == \"yes\", income > 100000 ) from town.getPersons() )";
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_BEGIN_OF_CONDITION2.
@Test(timeout = 10 * 1000)
public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION2() {
String input = "rule MyRule \n" + " when \n" + " Class( condition == true ) \n" + " ";
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()));
}
Aggregations