this.parameters = parameters;
}
private Description createDescription(TestClass testClass, BundleRepository[] repositories) {
if (repositories.length == 1) {
Description testClassDescription = Description.createSuiteDescription(testClass.getJavaClass());
for (FrameworkMethod method : testClass.getAnnotatedMethods(Test.class.getName())) {
testClassDescription.addChild(methodDescription(testClass, method, 0));
}
return testClassDescription;
} else {
Description testParentDescription = Description.createSuiteDescription(testClass.getJavaClass());
int index = 0;
for (BundleRepository repository : repositories) {
index++;
Description testClassDescription = Description.createSuiteDescription(repository.getLocation().toString());
testParentDescription.addChild(testClassDescription);
for (FrameworkMethod method : testClass.getAnnotatedMethods(Test.class.getName())) {
testClassDescription.addChild(methodDescription(testClass, method, index));
}
}
return testParentDescription;
}
}