Add the TestCommandFactory with a getTestMethods.
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
package space.kklochko.simple_jbdd.tests.factories
|
||||
|
||||
import space.kklochko.simple_jbdd.test_examples.tests.SimpleThenTest
|
||||
import space.kklochko.simple_jbdd.tests.factories.TestCommandFactory;
|
||||
import spock.lang.Specification
|
||||
|
||||
class TestCommandFactorySpec extends Specification {
|
||||
def "If the map of methods have one test block."() {
|
||||
given: "I have a TestCommandFactory object"
|
||||
def factory = new TestCommandFactory();
|
||||
|
||||
and: "I also have a SimpleThenTest object"
|
||||
def simpleThenTest = new SimpleThenTest()
|
||||
|
||||
when: "If a test have only one block"
|
||||
def map = factory.getTestMethods(simpleThenTest.getClass())
|
||||
|
||||
then: "the map size is 1 method"
|
||||
1 == map.size()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user