@Test(timeout=10*1000) public void testCheckRuleHeaderLocationDetermination3() { String input = "rule \"Hello World\" ruleflow-group \"hello\" s"; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_RULE_HEADER, getLastIntegerValue(parser .getEditorInterface().get(0).getContent())); }
@Test(timeout=10*1000) public void testCheckRuleHeaderLocationDetermination_dialect1() { String input = "rule MyRule \n" + " dialect \"java\""; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_RULE_HEADER, getLastIntegerValue(parser .getEditorInterface().get(0).getContent())); }
@Test(timeout=10*1000) public void testCheckRuleHeaderLocationDetermination() { String input = "rule MyRule "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_RULE_HEADER, getLastIntegerValue(parser .getEditorInterface().get(0).getContent())); }
@Test(timeout=10*1000) public void testCheckQueryLocationDetermination_RULE_HEADER1() { String input = "query MyQuery "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_RULE_HEADER, getLastIntegerValue(parser .getEditorInterface().get(0).getContent())); }
@Test(timeout=10*1000) public void testCheckQueryLocationDetermination_RULE_HEADER2() { String input = "query \"MyQuery\" "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_RULE_HEADER, getLastIntegerValue(parser .getEditorInterface().get(0).getContent())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START6() { String input = "rule MyRule \n" + " when \n" + " Class ( \n" + " "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START21() { String input = "rule MyRule \n" + " when \n" + " not Class ("; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test(timeout=10*1000) public void testCheckRHSLocationDetermination_startOfNewlINE() { String input = "rule MyRule \n" + " when\n" + " Class ( )\n" + " then\n" + " assert(null);\n" + " "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_RHS, getLastIntegerValue(parser .getEditorInterface().get(0).getContent())); }
@Test(timeout=10*1000) public void testCheckRuleHeaderLocationDetermination_dialect2() { String input = "rule MyRule \n" + " dialect \"mvel\""; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_RULE_HEADER, getLastIntegerValue(parser .getEditorInterface().get(0).getContent())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION4() { String input = "rule MyRule \n" + " when \n" + " Cl"; 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())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION7() { String input = "rule MyRule \n" + " when \n" + " class:Cl"; 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())); }
@Test//(timeout=10*1000) public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START2() { String input = "rule MyRule \n" + " when \n" + " Class ( na"; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@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())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDeterminationINSIDE_CONDITION_START16() { String input = "rule MyRule \n" + " when \n" + " exists Class ("; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_AND_OR22() { String input = "rule MyRule \n" + " when \n" + " Class ( ) or "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_AND_OR, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START9b() { String input = "rule MyRule \n" + " when \n" + " Class ( name: "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_EXISTS4() { String input = "rule MyRule \n" + " when \n" + " exists Cl"; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test(timeout=10*1000) public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION_EXISTS5() { String input = "rule MyRule \n" + " when \n" + " exists ( Cl"; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION_EXISTS, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test//(timeout=10*1000) public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START22() { String input = "rule MyRule \n" + " when \n" + " not ( exists Class ("; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
@Test(timeout=10*1000) public void testCheckQueryLocationDetermination_LHS_INSIDE_CONDITION_START() { String input = "query MyQuery \n" + " Class ("; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }