Package org.sonar.batch.issue.ignore.pattern

Examples of org.sonar.batch.issue.ignore.pattern.LineRange


  public void shouldAddPatternToExcludeSeveralLineRanges() throws Exception {
    regexpScanner.scan(javaFile, new File(Resources.getResource(
      "org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScannerTest/file-with-double-regexp-twice.txt").toURI()), UTF_8);

    Set<LineRange> lineRanges = Sets.newHashSet();
    lineRanges.add(new LineRange(21, 25));
    lineRanges.add(new LineRange(29, 33));
    verify(patternsInitializer).getPatternMatcher();
    verify(patternMatcher, times(1)).addPatternToExcludeLines(javaFile, lineRanges);
    verifyNoMoreInteractions(patternsInitializer);
  }
View Full Code Here


  public void shouldAddPatternToExcludeLinesWithWrongOrder() throws Exception {
    regexpScanner.scan(javaFile, new File(Resources.getResource(
      "org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScannerTest/file-with-double-regexp-wrong-order.txt").toURI()), UTF_8);

    Set<LineRange> lineRanges = Sets.newHashSet();
    lineRanges.add(new LineRange(25, 35));
    verify(patternsInitializer).getPatternMatcher();
    verify(patternMatcher, times(1)).addPatternToExcludeLines(javaFile, lineRanges);
    verifyNoMoreInteractions(patternsInitializer);
  }
View Full Code Here

  public void shouldAddPatternToExcludeLinesWithMess() throws Exception {
    regexpScanner.scan(javaFile, new File(Resources.getResource(
      "org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScannerTest/file-with-double-regexp-mess.txt").toURI()), UTF_8);

    Set<LineRange> lineRanges = Sets.newHashSet();
    lineRanges.add(new LineRange(21, 29));
    verify(patternsInitializer).getPatternMatcher();
    verify(patternMatcher, times(1)).addPatternToExcludeLines(javaFile, lineRanges);
    verifyNoMoreInteractions(patternsInitializer);
  }
View Full Code Here

TOP

Related Classes of org.sonar.batch.issue.ignore.pattern.LineRange

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.