1 package org.simantics.tests.modelled.junit;
3 import java.util.ArrayList;
4 import java.util.Collection;
7 import org.junit.runner.Description;
8 import org.simantics.scl.compiler.commands.CommandSession;
9 import org.simantics.scl.osgi.SCLOsgi;
12 public class RuntimeSTSSuiteRunner extends RuntimeSTSRunner<RuntimeSTSTestRunner> {
14 private final List<RuntimeSTSTestRunner> children = new ArrayList<>();
15 private final String suiteName;
17 protected RuntimeSTSSuiteRunner(Class<?> clazz, String suiteName) throws Exception {
19 this.suiteName = suiteName;
23 protected String getName() {
28 public Description getDescription() {
29 Description description = Description.createSuiteDescription(getName(), getRunnerAnnotations());
30 getChildren().forEach(child -> description.addChild(describeChild(child)));
34 public void addChildren(Collection<RuntimeSTSTestRunner> testChildren) {
35 CommandSession session = new CommandSession(SCLOsgi.MODULE_REPOSITORY, null);
36 testChildren.forEach(c -> c.setCommandSession(session));
37 children.addAll(testChildren);
41 protected boolean isIgnored(RuntimeSTSTestRunner child) {
42 // TODO Auto-generated method stub
43 return super.isIgnored(child);
47 public List<RuntimeSTSTestRunner> getChildren() {
52 public void initialize() throws Exception {
56 public void deinitialize() throws Exception {