From a1b85e377184aa66dde763f4b04ff1a5d6e5bd46 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Tue, 26 Sep 2023 22:14:55 +0300 Subject: [PATCH] Refactor the SimpleTestRunner and its test. --- .../kklochko/simple_jbdd/tests/runners/SimpleTestRunner.java | 4 ++-- .../simple_jbdd/tests/runners/SimpleTestRunnerSpec.groovy | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunner.java b/src/main/java/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunner.java index 69d62b4..0a0e453 100644 --- a/src/main/java/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunner.java +++ b/src/main/java/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunner.java @@ -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 command; + private AbstractTestCommand command; public SimpleTestRunner(AbstractTestCommand command) { - this.command = command; + setCommand(command); } public boolean run() { diff --git a/src/test/groovy/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunnerSpec.groovy b/src/test/groovy/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunnerSpec.groovy index 5f0b7bb..02ab51f 100644 --- a/src/test/groovy/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunnerSpec.groovy +++ b/src/test/groovy/space/kklochko/simple_jbdd/tests/runners/SimpleTestRunnerSpec.groovy @@ -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 } }