aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/common/test/TestSuite.java
diff options
context:
space:
mode:
authorJ08nY2017-12-28 00:51:41 +0100
committerJ08nY2017-12-28 00:51:41 +0100
commit67c963266711f863a024bd6d7ff6e6da5d7b08b8 (patch)
treeda50470d3735db2f4faeb0fb70c4ee1849d9ef80 /src/cz/crcs/ectester/common/test/TestSuite.java
parent3344df8d86821c936c011c547da5495cc177ab85 (diff)
downloadECTester-67c963266711f863a024bd6d7ff6e6da5d7b08b8.tar.gz
ECTester-67c963266711f863a024bd6d7ff6e6da5d7b08b8.tar.zst
ECTester-67c963266711f863a024bd6d7ff6e6da5d7b08b8.zip
Hide the Cleanup command in test suites.
Diffstat (limited to 'src/cz/crcs/ectester/common/test/TestSuite.java')
-rw-r--r--src/cz/crcs/ectester/common/test/TestSuite.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cz/crcs/ectester/common/test/TestSuite.java b/src/cz/crcs/ectester/common/test/TestSuite.java
index 74a24af..1a7c914 100644
--- a/src/cz/crcs/ectester/common/test/TestSuite.java
+++ b/src/cz/crcs/ectester/common/test/TestSuite.java
@@ -5,6 +5,7 @@ import cz.crcs.ectester.data.EC_Store;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
+import java.util.stream.Collectors;
/**
* @author Jan Jancar johny@neuromancer.sk
@@ -12,7 +13,7 @@ import java.util.List;
public abstract class TestSuite {
protected String name;
protected String description;
- protected List<Test> tests = new LinkedList<>();
+ protected List<Runnable> run = new LinkedList<>();
protected EC_Store dataStore;
public TestSuite(EC_Store dataStore, String name, String description) {
@@ -21,8 +22,16 @@ public abstract class TestSuite {
this.description = description;
}
+ public List<Runnable> getRunnables() {
+ return Collections.unmodifiableList(run);
+ }
+
+ @SuppressWarnings("unchecked")
public List<Test> getTests() {
- return Collections.unmodifiableList(tests);
+ return Collections.unmodifiableList((List<Test>)(List<?>) run
+ .stream()
+ .filter(runnable -> (runnable instanceof Test))
+ .collect(Collectors.toList()));
}
public String getName() {