import java.util.List;\r
\r
import org.junit.runner.Description;\r
-import org.junit.runner.Runner;\r
import org.simantics.scl.compiler.commands.CommandSession;\r
import org.simantics.scl.osgi.SCLOsgi;\r
\r
-public class RuntimeSTSSuiteRunner extends RuntimeSTSRunner {\r
+public class RuntimeSTSSuiteRunner extends RuntimeSTSRunner<RuntimeSTSTestRunner> {\r
\r
private final List<RuntimeSTSTestRunner> children = new ArrayList<>();\r
private final String suiteName;\r
\r
- RuntimeSTSSuiteRunner(String suiteName) throws Exception {\r
- super(RuntimeSTSSuiteRunner.class);\r
+ protected RuntimeSTSSuiteRunner(Class<?> clazz, String suiteName) throws Exception {\r
+ super(clazz);\r
this.suiteName = suiteName;\r
}\r
- \r
+\r
@Override\r
protected String getName() {\r
return suiteName;\r
testChildren.forEach(c -> c.setCommandSession(session));\r
children.addAll(testChildren);\r
}\r
- \r
- @SuppressWarnings({ "unchecked", "rawtypes" })\r
+\r
@Override\r
- protected List<Runner> getChildren() {\r
- return (List) children;\r
+ public List<RuntimeSTSTestRunner> getChildren() {\r
+ return children;\r
}\r
\r
@Override\r
- public void initialize() {\r
+ public void initialize() throws Exception {\r
}\r
\r
@Override\r
- public void deinitialize() {\r
+ public void deinitialize() throws Exception {\r
}\r
\r
}\r
import java.util.List;\r
import java.util.Set;\r
\r
-import org.junit.runner.Runner;\r
import org.simantics.Simantics;\r
import org.simantics.databoard.Bindings;\r
import org.simantics.db.ReadGraph;\r
if (tests.isEmpty())\r
continue;\r
\r
- RuntimeSTSSuiteRunner suite = new RuntimeSTSSuiteRunner(suiteName);\r
+ RuntimeSTSSuiteRunner suite = new RuntimeSTSSuiteRunner(RuntimeSTSSuiteRunner.class, suiteName);\r
List<RuntimeSTSTestRunner> testRunners = new ArrayList<>();\r
for (Resource test : tests) {\r
String testName = graph.getRelatedValue(test, L0.HasName, Bindings.STRING);\r
}\r
}\r
\r
- public static List<Runner> collectTests() {\r
+ public static List<RuntimeSTSSuiteRunner> collectTests() {\r
return new ArrayList<>(collectTestsFromGraph());\r
}\r
}\r