mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testng: fix filtering according to selected params (IDEA-151744)
This commit is contained in:
@@ -22,6 +22,7 @@ import org.testng.xml.XmlInclude;
|
||||
import org.testng.xml.XmlSuite;
|
||||
import org.testng.xml.XmlTest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -53,10 +54,11 @@ public class IDEARemoteTestNG extends TestNG {
|
||||
try {
|
||||
if (myParam != null) {
|
||||
for (XmlClass aClass : test.getXmlClasses()) {
|
||||
List<XmlInclude> includes = new ArrayList<XmlInclude>();
|
||||
for (XmlInclude include : aClass.getIncludedMethods()) {
|
||||
final XmlInclude xmlInclude = new XmlInclude(include.getName(), Collections.singletonList(Integer.parseInt(myParam)), 0);
|
||||
aClass.setIncludedMethods(Collections.singletonList(xmlInclude));
|
||||
includes.add(new XmlInclude(include.getName(), Collections.singletonList(Integer.parseInt(myParam)), 0));
|
||||
}
|
||||
aClass.setIncludedMethods(includes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user