出于某种原因,groupProperty 不适用于我的集成测试。我收到以下异常:
groovy.lang.MissingMethodException:没有方法签名:mypackage.CarIntTests.groupProperty() 适用于参数类型:(java.lang.String) 值:[car]
def names = ['Honda', 'Toyota', 'Nissan']
3.times {
Garage.build(name: names[it])
}
def results = Garage.withCriteria {
car {
eq('brand', 'Honda')
}
projections {
groupProperty('car')
}
}
assert results == names[0..0]