Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for API change in JUnit. #127

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

Expand Down Expand Up @@ -78,7 +79,7 @@ public void annotationDoesNotFailForPipeline() throws Exception {
TestResultAction action = getTestResultActionForPipeline("workspace2.zip", "pipelineTest.groovy", Result.UNSTABLE);

ClassResult cr = getClassResult(action, TEST_PACKAGE, "SignupTest");
List<CaseResult> caseResults = cr.getChildren();
Collection<CaseResult> caseResults = cr.getChildren();
assertEquals(3, caseResults.size());

CaseResult failingCase = cr.getCaseResult("A_003_Type_the_text__jenkins__into_the_field__username_");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import hudson.util.DescribableList;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.junit.Rule;
Expand Down Expand Up @@ -88,7 +89,7 @@ public void testAttachmentsShownForTestcases_SignupTest() throws Exception {
TestResultAction action = getTestResultActionForBuild("workspace2.zip", Result.UNSTABLE);

ClassResult classResult = getClassResult(action, "SignupTest");
List<CaseResult> cases = classResult.getChildren();
List<CaseResult> cases = new ArrayList<>(classResult.getChildren());
assertEquals(3, cases.size());

// Each test case should have the respective one attachment
Expand All @@ -103,7 +104,7 @@ public void testAttachmentsShownForTestcases_SignupTest_WithRunnerPrefix() throw
TestResultAction action = getTestResultActionForBuild("workspace3.zip", Result.UNSTABLE);

ClassResult classResult = getClassResult(action, "SignupTest");
List<CaseResult> cases = classResult.getChildren();
List<CaseResult> cases = new ArrayList<>(classResult.getChildren());
assertEquals(3, cases.size());

// Each test case should have the respective one attachment
Expand All @@ -127,7 +128,7 @@ public void testAttachmentsShownForTestcases_LoginTest() throws Exception {
TestResultAction action = getTestResultActionForBuild("workspace2.zip", Result.UNSTABLE);

ClassResult classResult = getClassResult(action, "LoginTest");
List<CaseResult> cases = classResult.getChildren();
List<CaseResult> cases = new ArrayList<>(classResult.getChildren());
assertEquals(4, cases.size());

// Each test case should have the respective one (or zero) attachments
Expand All @@ -154,7 +155,7 @@ public void testAttachmentsShownForTestcases_MiscTest1() throws Exception {
TestResultAction action = getTestResultActionForBuild("workspace2.zip", Result.UNSTABLE);

ClassResult classResult = getClassResult(action, "MiscTest1");
List<CaseResult> cases = classResult.getChildren();
List<CaseResult> cases = new ArrayList<>(classResult.getChildren());
assertEquals(1, cases.size());

// Attachment should not be inherited from testsuite
Expand All @@ -177,7 +178,7 @@ public void testAttachmentsShownForTestcases_MiscTest2() throws Exception {
TestResultAction action = getTestResultActionForBuild("workspace2.zip", Result.UNSTABLE);

ClassResult classResult = getClassResult(action, "MiscTest2");
List<CaseResult> cases = classResult.getChildren();
List<CaseResult> cases = new ArrayList<>(classResult.getChildren());
assertEquals(2, cases.size());

// Alphabetically first comes the "doNothing" test
Expand Down