junit/testng: restore abstract method name to run
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 1 Feb 2012 07:03:56 +0000 (11:03 +0400)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 1 Feb 2012 07:03:56 +0000 (11:03 +0400)
plugins/junit/src/com/intellij/execution/junit/JUnitConfiguration.java
plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfiguration.java

index 469d4b64ed03b62012cc72c1c9a5f70cd10930ab..1665873b828b6f0cee30e18a3d0fc4faaf2526c6 100644 (file)
@@ -363,13 +363,13 @@ public class JUnitConfiguration extends ModuleBasedConfiguration<JavaRunConfigur
   }
 
   public void bePatternConfiguration(List<PsiClass> classes, PsiMethod method) {
-    Set<String> patterns = new HashSet<String>();
+    myData.TEST_OBJECT = TEST_PATTERN;
+    final Set<String> patterns = new HashSet<String>();
+    myData.METHOD_NAME = method.getName();
     for (PsiClass pattern : classes) {
-      patterns.add(JavaExecutionUtil.getRuntimeQualifiedName(pattern));
+      patterns.add(JavaExecutionUtil.getRuntimeQualifiedName(pattern) + "," + myData.METHOD_NAME);
     }
     myData.setPatterns(patterns);
-    myData.METHOD_NAME = method.getName();
-    myData.TEST_OBJECT = TEST_PATTERN;
     setGeneratedName();
   }
 
index 52bc39ee1adfb0e0e39a31577a15f044723199cd..92a67174157c5aa66e2e1aa0a4013bb4a325e8ef 100644 (file)
@@ -261,13 +261,13 @@ public class TestNGConfiguration extends ModuleBasedConfiguration<JavaRunConfigu
   
   
   public void bePatternConfiguration(List<PsiClass> classes, PsiMethod method) {
+    data.TEST_OBJECT = TestType.PATTERN.getType();
+    data.METHOD_NAME = method.getName();
     Set<String> patterns = new HashSet<String>();
     for (PsiClass pattern : classes) {
-      patterns.add(JavaExecutionUtil.getRuntimeQualifiedName(pattern));
+      patterns.add(JavaExecutionUtil.getRuntimeQualifiedName(pattern) + "," + data.METHOD_NAME);
     }
     data.setPatterns(patterns);
-    data.METHOD_NAME = method.getName();
-    data.TEST_OBJECT = TestType.PATTERN.getType();
     setGeneratedName();
   }