From d70db7f663078711790d35636aeb1810d4eb7542 Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Thu, 30 Mar 2017 11:42:42 +0200 Subject: [PATCH] junit pattern configuration: ensure class name is correctly extracted --- .../junit/src/com/intellij/execution/junit/TestsPattern.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/junit/src/com/intellij/execution/junit/TestsPattern.java b/plugins/junit/src/com/intellij/execution/junit/TestsPattern.java index cd2932a35f29..261d8172205b 100644 --- a/plugins/junit/src/com/intellij/execution/junit/TestsPattern.java +++ b/plugins/junit/src/com/intellij/execution/junit/TestsPattern.java @@ -90,7 +90,7 @@ public class TestsPattern extends TestPackage { private PsiClass getTestClass(Project project, String className) { SourceScope sourceScope = getSourceScope(); GlobalSearchScope searchScope = sourceScope != null ? sourceScope.getGlobalSearchScope() : GlobalSearchScope.allScope(project); - return JavaExecutionUtil.findMainClass(project, StringUtil.getPackageName(className, ','), searchScope); + return JavaExecutionUtil.findMainClass(project, className.contains(",") ? StringUtil.getPackageName(className, ',') : className, searchScope); } @Override