Compare commits
2
Commits
0683be643f
...
9056c8d047
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9056c8d047 | ||
|
|
a1b85e3771 |
+10
@@ -0,0 +1,10 @@
|
||||
package space.kklochko.simple_jbdd.tests.factories;
|
||||
|
||||
import space.kklochko.simple_jbdd.tests.Test;
|
||||
import space.kklochko.simple_jbdd.tests.commands.AbstractTestCommand;
|
||||
import space.kklochko.simple_jbdd.tests.runners.AbstractTestRunner;
|
||||
|
||||
public abstract class AbstractTestRunnerFactory {
|
||||
public abstract AbstractTestRunner create(AbstractTestCommand<Test> command);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package space.kklochko.simple_jbdd.tests.factories;
|
||||
|
||||
import space.kklochko.simple_jbdd.tests.Test;
|
||||
import space.kklochko.simple_jbdd.tests.commands.AbstractTestCommand;
|
||||
import space.kklochko.simple_jbdd.tests.runners.AbstractTestRunner;
|
||||
import space.kklochko.simple_jbdd.tests.runners.SimpleTestRunner;
|
||||
|
||||
public class SimpleTestRunnerFactory extends AbstractTestRunnerFactory {
|
||||
public AbstractTestRunner create(AbstractTestCommand<Test> command) {
|
||||
return new SimpleTestRunner(command);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import space.kklochko.simple_jbdd.tests.Test;
|
||||
import space.kklochko.simple_jbdd.tests.commands.AbstractTestCommand;
|
||||
|
||||
public class SimpleTestRunner extends AbstractTestRunner {
|
||||
AbstractTestCommand<Test> command;
|
||||
private AbstractTestCommand<Test> command;
|
||||
|
||||
public SimpleTestRunner(AbstractTestCommand<Test> command) {
|
||||
this.command = command;
|
||||
setCommand(command);
|
||||
}
|
||||
|
||||
public boolean run() {
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class SimpleTestRunnerSpec extends Specification {
|
||||
when: "The testCommand has been run"
|
||||
def result = runner.run()
|
||||
|
||||
then: "The result is true"
|
||||
then: "The result is false"
|
||||
!result
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user