Skip to content

Commit

Permalink
Fix import of moved parent test class.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Jan 15, 2024
1 parent 610ecaa commit f95b140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.jenkins.plugins.analysis.warnings.groovy;

import edu.hm.hafner.analysis.AbstractParserTest;
import edu.hm.hafner.analysis.Issue;
import edu.hm.hafner.analysis.Report;
import edu.hm.hafner.analysis.Severity;
import edu.hm.hafner.analysis.assertions.Assertions;
import edu.hm.hafner.analysis.assertions.SoftAssertions;
import edu.hm.hafner.analysis.registry.AbstractParserTest;

/**
* Tests the class {@link DynamicDocumentParser}. Creates a new Eclipse parser in Groovy. All Eclipse test cases are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import org.junit.jupiter.api.Test;

import edu.hm.hafner.analysis.AbstractParserTest;
import edu.hm.hafner.analysis.Report;
import edu.hm.hafner.analysis.Severity;
import edu.hm.hafner.analysis.assertions.SoftAssertions;
import edu.hm.hafner.analysis.registry.AbstractParserTest;

import static edu.hm.hafner.analysis.assertions.Assertions.*;

Expand Down Expand Up @@ -43,13 +43,13 @@ protected void assertThatIssuesArePresent(final Report report, final SoftAsserti
public DynamicLineParser createParser() {
return new DynamicLineParser("(.*):(\\d+):(\\d+): (\\D\\d*) (.*)", toString("pep8.groovy"));
}

@Test
void shouldScanAllLinesAndAssignLineNumberAndFileName() {
DynamicLineParser parser = new DynamicLineParser("^(.*)$",
DynamicLineParser parser = new DynamicLineParser("^(.*)$",
"return builder.setFileName(fileName).setLineStart(lineNumber).setMessage(matcher.group(1)).buildOptional()");
Report report = parser.parse(createReaderFactory(FILE_NAME));

assertThat(report).hasSize(3);
for (int i = 0; i < 3; i++) {
assertThat(report.get(i)).hasBaseName(FILE_NAME).hasLineStart(i + 1).hasMessage(String.valueOf(i + 1));
Expand Down

0 comments on commit f95b140

Please sign in to comment.