Skip to content

Commit

Permalink
Fix integer based percentage output.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Apr 10, 2024
1 parent d10026e commit 928c395
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/edu/hm/hafner/grading/TestMarkdownTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void shouldShowScoreWithOneResult() {
.contains("|JUnit|1|5|3|4|12|27")
.contains(IMPACT_CONFIGURATION);
assertThat(testMarkdown.createSummary(score))
.contains("JUnit - 27 of 100", "41,67 % successful", "4 failed", "5 passed", "3 skipped");
.contains("JUnit - 27 of 100", "42 % successful", "4 failed", "5 passed", "3 skipped");
}

@Test
Expand Down Expand Up @@ -133,7 +133,7 @@ void shouldShowScoreWithTwoSubResults() {
"- test-class-skipped-1#test-skipped-1",
"- test-class-skipped-2#test-skipped-2");
assertThat(testMarkdown.createSummary(score))
.contains("JUnit - 77 of 100", "22,73 % successful", "14 failed", "5 passed", "3 skipped");
.contains("JUnit - 77 of 100", "23 % successful", "14 failed", "5 passed", "3 skipped");
}

@Test
Expand Down Expand Up @@ -173,7 +173,7 @@ void shouldShowNoImpactsWithTwoSubResults() {
.doesNotContain(IMPACT_CONFIGURATION)
.doesNotContain("Impact");
assertThat(testMarkdown.createSummary(score))
.contains("JUnit", "22,73 %", "14 failed", "5 passed", "3 skipped");
.contains("JUnit", "23 %", "14 failed", "5 passed", "3 skipped");
}

static Node createTwoReports(final ToolConfiguration tool) {
Expand Down Expand Up @@ -266,9 +266,9 @@ void shouldShowScoreWithTwoResults() {
"```text StackTrace-2```");
assertThat(testMarkdown.createSummary(score))
.containsIgnoringWhitespaces(
"One - 46 of 100", "41,67 % successful",
"One - 46 of 100", "42 % successful",
"8 failed", "10 passed", "6 skipped",
"Two - 40 of 100", "0,00 % successful",
"Two - 40 of 100", "0 % successful",
"20 failed");
}

Expand Down

0 comments on commit 928c395

Please sign in to comment.