【发布时间】:2013-11-12 13:32:29
【问题描述】:
我有类似规格的东西:
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]。
【问题讨论】:
-
大概这之后是寻找Spock的失踪方法。 :-)