X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.tests.modelled%2Fsrc%2Forg%2Fsimantics%2Ftests%2Fmodelled%2Fjunit%2FRuntimeSTSSuiteRunner.java;h=90abe0e1661d2ef29fe441a09088c2eb8b02baf4;hb=refs%2Fchanges%2F13%2F513%2F3;hp=70325319dcb25a0cb851f3c16c544a3958a6baa5;hpb=c125a1755cc7c4a6241c3c5bf841c3db0ff2d658;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/RuntimeSTSSuiteRunner.java b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/RuntimeSTSSuiteRunner.java index 70325319d..90abe0e16 100644 --- a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/RuntimeSTSSuiteRunner.java +++ b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/RuntimeSTSSuiteRunner.java @@ -1,54 +1,59 @@ -package org.simantics.tests.modelled.junit; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.junit.runner.Description; -import org.junit.runner.Runner; -import org.simantics.scl.compiler.commands.CommandSession; -import org.simantics.scl.osgi.SCLOsgi; - -public class RuntimeSTSSuiteRunner extends RuntimeSTSRunner { - - private final List children = new ArrayList<>(); - private final String suiteName; - - RuntimeSTSSuiteRunner(String suiteName) throws Exception { - super(RuntimeSTSSuiteRunner.class); - this.suiteName = suiteName; - } - - @Override - protected String getName() { - return suiteName; - } - - @Override - public Description getDescription() { - Description description = Description.createSuiteDescription(getName(), getRunnerAnnotations()); - getChildren().forEach(child -> description.addChild(describeChild(child))); - return description; - } - - public void addChildren(Collection testChildren) { - CommandSession session = new CommandSession(SCLOsgi.MODULE_REPOSITORY, null); - testChildren.forEach(c -> c.setCommandSession(session)); - children.addAll(testChildren); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - protected List getChildren() { - return (List) children; - } - - @Override - public void initialize() { - } - - @Override - public void deinitialize() { - } - -} +package org.simantics.tests.modelled.junit; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.junit.runner.Description; +import org.simantics.scl.compiler.commands.CommandSession; +import org.simantics.scl.osgi.SCLOsgi; + +@Deprecated +public class RuntimeSTSSuiteRunner extends RuntimeSTSRunner { + + private final List children = new ArrayList<>(); + private final String suiteName; + + protected RuntimeSTSSuiteRunner(Class clazz, String suiteName) throws Exception { + super(clazz); + this.suiteName = suiteName; + } + + @Override + protected String getName() { + return suiteName; + } + + @Override + public Description getDescription() { + Description description = Description.createSuiteDescription(getName(), getRunnerAnnotations()); + getChildren().forEach(child -> description.addChild(describeChild(child))); + return description; + } + + public void addChildren(Collection testChildren) { + CommandSession session = new CommandSession(SCLOsgi.MODULE_REPOSITORY, null); + testChildren.forEach(c -> c.setCommandSession(session)); + children.addAll(testChildren); + } + + @Override + protected boolean isIgnored(RuntimeSTSTestRunner child) { + // TODO Auto-generated method stub + return super.isIgnored(child); + } + + @Override + public List getChildren() { + return children; + } + + @Override + public void initialize() throws Exception { + } + + @Override + public void deinitialize() throws Exception { + } + +}