aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/common/test/SimpleTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cz/crcs/ectester/common/test/SimpleTest.java')
-rw-r--r--src/cz/crcs/ectester/common/test/SimpleTest.java38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/cz/crcs/ectester/common/test/SimpleTest.java b/src/cz/crcs/ectester/common/test/SimpleTest.java
deleted file mode 100644
index d2b3e94..0000000
--- a/src/cz/crcs/ectester/common/test/SimpleTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cz.crcs.ectester.common.test;
-
-/**
- * @param <T>
- * @author Jan Jancar johny@neuromancer.sk
- */
-public abstract class SimpleTest<T extends BaseTestable> extends Test implements Testable {
- protected T testable;
- protected TestCallback<T> callback;
-
- public SimpleTest(T testable, TestCallback<T> callback) {
- if (testable == null) {
- throw new IllegalArgumentException("testable is null.");
- }
- if (callback == null) {
- throw new IllegalArgumentException("callback is null.");
- }
- this.testable = testable;
- this.callback = callback;
- }
-
- public T getTestable() {
- return testable;
- }
-
- @Override
- protected void runSelf() {
- testable.run();
- result = callback.apply(testable);
- }
-
- @Override
- public SimpleTest clone() throws CloneNotSupportedException {
- SimpleTest clone = (SimpleTest) super.clone();
- clone.testable = testable.clone();
- return clone;
- }
-}