]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/v2/ModelledSTSTestRunner.java
Merge "Resolve some dependency problems with SDK features"
[simantics/platform.git] / bundles / org.simantics.tests.modelled / src / org / simantics / tests / modelled / junit / v2 / ModelledSTSTestRunner.java
1 package org.simantics.tests.modelled.junit.v2;
2
3 import java.io.IOException;
4 import java.util.List;
5
6 import org.junit.runner.Description;
7 import org.junit.runner.Runner;
8 import org.junit.runner.notification.Failure;
9 import org.junit.runner.notification.RunNotifier;
10 import org.simantics.tests.modelled.utils.ModelledSTSTest;
11 import org.simantics.tests.modelled.utils.ModelledSTSTest.CommandSessionVariable;
12
13 public class ModelledSTSTestRunner extends Runner {
14
15     private Description description;
16     private ModelledSTSTest test;
17
18     public ModelledSTSTestRunner(ModelledSTSTest test) {
19         this.test = test;
20     }
21
22     @Override
23     public Description getDescription() {
24         if (description == null)
25             description = Description.createTestDescription(ModelledSTSTestRunner.class, test.getName());
26         return description;
27     }
28
29     public List<CommandSessionVariable> runWithVars(List<CommandSessionVariable> vars) throws IOException {
30         return test.run(vars);
31     }
32     
33     @Override
34     public void run(RunNotifier notifier) {
35         throw new UnsupportedOperationException();
36     }
37
38     public boolean isIgnored() {
39         return test.isIgnored();
40     }
41
42     public int getPriority() {
43         return test.getPriority();
44     }
45
46     public ModelledSTSTest getTest() {
47         return test;
48     }
49 }