2 つの統合テストがあります。RoutingLane というクラスの両方で動的ファインダーを使用しようとしています。2 番目のテストは MissingMethodException で失敗します。
Failure: testMockRouteLane2(compliance.processor.services.CalculationServiceTests)
groovy.lang.MissingMethodException: No signature of method: RoutingLane.methodMissing() is applicable for argument types: () values: []
モック関数は次のとおりです。
void testMockRouteLane() {
def routingLaneMock = RoutingLane.findAllByMot('TL')
assert routingLaneMock != null
assert routingLaneMock.size() >= 1
}
void testMockRouteLane2() {
def routingLaneMock = RoutingLane.findAllByMot('TL')
assert routingLaneMock != null
assert routingLaneMock.size() >= 1
}
原因は何ですか?