Package org.drools.ide.common.assistant.info.drl

Examples of org.drools.ide.common.assistant.info.drl.RuleBasicContentInfo


  }

    @Test
    public void testExecuteEngine() {
    info = (DRLRuleRefactorInfo) engine.parse();
    RuleBasicContentInfo content = info.getContentAt(123);
      assertEquals(true, content!=null);
  }
View Full Code Here


  }

    @Test
    public void testImport() {
    info = (DRLRuleRefactorInfo) engine.parse();
    RuleBasicContentInfo content = info.getContentAt(9);
      assertEquals(true, content!=null);
  }
View Full Code Here

  }

    @Test
    public void testNothingInteresting() {
    info = (DRLRuleRefactorInfo) engine.parse();
    RuleBasicContentInfo content = info.getContentAt(199);
      assertEquals(true, content==null);
  }
View Full Code Here

  }

    @Test
    public void testInsideTheRuleName() {
    info = (DRLRuleRefactorInfo) engine.parse();
    RuleBasicContentInfo content = info.getContentAt(670);
      assertEquals(true, content==null);
  }
View Full Code Here

  }

    @Test
    public void testInsideLHSRule() {
    info = (DRLRuleRefactorInfo) engine.parse();
    RuleBasicContentInfo content = info.getContentAt(790);
      assertEquals(true, content!=null);
  }
View Full Code Here

  }

    @Test
    public void testInsideRHSRule() {
    info = (DRLRuleRefactorInfo) engine.parse();
    RuleBasicContentInfo content = info.getContentAt(830);
      assertEquals(true, content!=null);
  }
View Full Code Here

    rule += "\t\tm.setMessage( \"Bon Giorno\" );\n";
    rule += "end";

    engine = new DRLParserEngine(rule);
    info = (DRLRuleRefactorInfo) engine.parse();
    RuleBasicContentInfo content = info.getContentAt(173);

      assertEquals(true, content!=null);
      assertEquals(DRLContentTypeEnum.RULE_LHS_LINE, content.getType());
      assertEquals("rule \"Hello World\"", ((RuleLineContentInfo)content).getRule().getRuleName());
      assertEquals("\t\tPrueba()", content.getContent());

    content = info.getContentAt(343);
      assertEquals(true, content!=null);
      assertEquals(DRLContentTypeEnum.RULE_LHS_LINE, content.getType());
      assertEquals("rule \"GoodBye World\"", ((RuleLineContentInfo)content).getRule().getRuleName());
      assertEquals("\twhen", content.getContent());
  }
View Full Code Here

        rule += "        update( $m ) ;\n";
        rule += "end";

        engine = new DRLParserEngine(rule);
        info = (DRLRuleRefactorInfo) engine.parse();
        RuleBasicContentInfo content = info.getContentAt(87);

        RenameAssistantOption assistantOption = new RenameAssistantOption("rename variable", "message", content, 87);

        AssistantOption result = VariableRename.execute(assistantOption, "msg");
View Full Code Here

    }

    @Test
    public void testExecuteEngine() {
        info = (DRLRuleRefactorInfo) engine.parse();
        RuleBasicContentInfo content = info.getContentAt(123);
        assertEquals(true, content!=null);
    }
View Full Code Here

    }

    @Test
    public void testImport() {
        info = (DRLRuleRefactorInfo) engine.parse();
        RuleBasicContentInfo content = info.getContentAt(9);
        assertEquals(true, content!=null);
    }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.assistant.info.drl.RuleBasicContentInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.