Skip to content

Commit

Permalink
Use annotation org.junitpioneer.jupiter.Issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Oct 16, 2023
1 parent ad75c26 commit ee35a52
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.DefaultLocale;
import org.junitpioneer.jupiter.Issue;

import edu.hm.hafner.coverage.ClassNode;
import edu.hm.hafner.coverage.Coverage;
Expand Down Expand Up @@ -76,8 +77,8 @@ private void verifySmallTree(final Node duplicateMethods) {
.containsExactly("Enumerate()");
}

@Test
void shouldMergeCorrectly729() {
@Test @Issue("jenkinsci/code-coverage-api-plugin#729")
void shouldMergeCorrectly() {
var builder = new CoverageBuilder();

Node a = readReport("cobertura-merge-a.xml");
Expand Down Expand Up @@ -135,16 +136,16 @@ private void verifyMissedAndCoveredLines(final Node left) {
35, 36, 37, 38, 40, 41, 42, 45, 54, 60, 66, 71, 72));
}

@Test
void shouldCountCorrectly625() {
@Test @Issue("jenkinsci/code-coverage-api-plugin#625")
void shouldCountCorrectly() {
Node tree = readReport("cobertura-counter-aggregation.xml");

var expectedValue = new CoverageBuilder().setCovered(31).setMissed(1).setMetric(BRANCH).build();
assertThat(tree.getValue(BRANCH)).isPresent().contains(expectedValue);
}

@Test
void shouldReadCoberturaIssue610() {
@Test @Issue("jenkinsci/code-coverage-api-plugin#610")
void shouldReadCoberturaWithMissingSources() {
Node tree = readReport("coverage-missing-sources.xml");

assertThat(tree.getAll(MODULE)).hasSize(1).extracting(Node::getName).containsExactly("-");
Expand All @@ -154,8 +155,8 @@ void shouldReadCoberturaIssue610() {
"src/args.ts", "src/badge-result.ts", "src/colors.ts", "src/index.ts");
}

@Test
void shouldReadCoberturaIssue599() {
@Test @Issue("jenkinsci/code-coverage-api-plugin#599")
void shouldReadCoberturaAggregation() {
Node tree = readReport("cobertura-ts.xml");

assertThat(tree.getAll(MODULE)).hasSize(1).extracting(Node::getName).containsExactly("-");
Expand Down Expand Up @@ -227,8 +228,8 @@ void shouldReadCoberturaIssue599() {

}

@Test
void shouldReadCoberturaIssue473() {
@Test @Issue("jenkinsci/code-coverage-api-plugin#473")
void shouldReadCoberturaNpe() {
Node tree = readReport("cobertura-npe.xml");

assertThat(tree.getAll(MODULE)).hasSize(1).extracting(Node::getName).containsOnly("-");
Expand Down Expand Up @@ -256,8 +257,8 @@ void shouldReadCoberturaIssue473() {
new LinesOfCode(44 + 9));
}

@Test
void shouldReadCoberturaIssue551() {
@Test @Issue("jenkinsci/code-coverage-api-plugin#551")
void shouldReadCoberturaAbsolutePath() {
Node tree = readReport("cobertura-absolute-path.xml");

assertThat(tree.getAll(MODULE)).hasSize(1).extracting(Node::getName).containsOnly("-");
Expand Down

0 comments on commit ee35a52

Please sign in to comment.