Skip to content

Commit

Permalink
Fix clicking on a ParametrizedTest
Browse files Browse the repository at this point in the history
When we click on the 'grouping' element for a ParametrizedTest, the code
tries to find the method without the parameter types, but the search
actually tries to find a parameter-less method with the same name.
  • Loading branch information
gzsombor committed Oct 26, 2024
1 parent 348433b commit cfcda24
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,14 +450,14 @@ private OpenTestAction getOpenTestAction(TestSuiteElement testSuite) {

if (children.length > 0 && children[0] instanceof TestCaseElement tce && tce.isDynamicTest()) {
// a group of parameterized tests
return new OpenTestAction(fTestRunnerPart, (TestCaseElement) children[0], null);
return new OpenTestAction(fTestRunnerPart, tce, tce.getParameterTypes());
}
if (children.length == 0) {
// check if we have applied the workaround for: https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/945
TestCaseElement child= testSuite.getSingleDynamicChild();
if (child != null) {
// a parameterized test that ran only one test
return new OpenTestAction(fTestRunnerPart, child, null);
return new OpenTestAction(fTestRunnerPart, child, child.getParameterTypes());
}
}

Expand Down

0 comments on commit cfcda24

Please sign in to comment.