我有一些看起来像类似规范的东西:
def "my spec"(Record record) {
given:
Something something = getSomething()
and:
otherThing = getOtherThing()
doFlow(something, record)
if (record.someType = Types.SOME_SPECIFIC_TYPE) {
doFlow(something, record)
}
}
def doFlow(Something something, Record record) {
when:
//code
then:
//asserts
when:
//code
and:
//mode code
then:
//code
}
但是,在运行时,我得到:groovy.lang.MissingMethodException: No signature of method doFlow() is applicable for arguments Something, Record values: [given values]
.