@Override
  public void map(
      final RobotLine currentLine,
      final RobotToken rt,
      final ParsingState currentState,
      final RobotFile fileModel) {
    List<TestCase> testCases = fileModel.getTestCaseTable().getTestCases();
    TestCase testCase = testCases.get(testCases.size() - 1);

    List<TestCaseTags> tags = testCase.getTags();
    TestCaseTags testCaseTags = tags.get(tags.size() - 1);
    testCaseTags.addCommentPart(rt);
  }
Beispiel #2
0
 private void reportUnknownVariablesInTagsSetting(
     final TestCase testCase, final Set<String> variables) {
   final List<TestCaseTags> tags = testCase.getTags();
   for (final TestCaseTags testCaseTags : tags) {
     final List<RobotToken> tagsTokens = testCaseTags.getTags();
     for (final RobotToken tagToken : tagsTokens) {
       final List<VariableDeclaration> variablesDeclarationsInTag =
           new VariableExtractor()
               .extract(tagToken, validationContext.getFile().getName())
               .getCorrectVariables();
       if (!variablesDeclarationsInTag.isEmpty()) {
         reportUnknownVariablesInSettingWithoutExeRows(
             validationContext, reporter, variablesDeclarationsInTag, variables);
       }
     }
   }
 }