graemerocher opened a new issue, #14658: URL: https://github.com/apache/grails-core/issues/14658
Original Reporter: keithrz Environment: Not Specified Version: 2.0.1 Migrated From: http://jira.grails.org/browse/GRAILS-8841 My service unit test worked until I added the [ignoreCase: true] parameter to an eq() method. The service works as expected outside of unit tests. The service code is below. I did not include the code for the test Spec (Version: Spock 0.6-SNAPSHOT), but it doesn't seem to matter what is in the test Spec, as long as it calls the service. Service Code: {code} package myPackage class myService { def getDomainObjs(value) { def bundleList = MyDomainObj.withCriteria() { eq("value", value, [ignoreCase: true]) } } } {code} Stack Trace: {code} groovy.lang.MissingMethodException: No signature of method: myPackage.myService.eq() is applicable for argument types: (java.lang.String, java.lang.String, java.util.LinkedHashMap) values: [value, value, [ignoreCase:true]] Possible solutions: grep(), any(), wait(), every(), dump(), find() at myPackage.myService.getDomainObjs_closure1(myService.groovy:6) at myPackage.myService.getDomainObjs_closure1(myService.groovy) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:406) at grails.gorm.CriteriaBuilder.invokeClosureNode(CriteriaBuilder.java:990) at grails.gorm.CriteriaBuilder.invokeMethod(CriteriaBuilder.java:312) at org.grails.datastore.gorm.GormStaticApi.withCriteria(GormStaticApi.groovy:261) at myPackage.myService.getDomainObjs(ContentBundleService.groovy:5) at myPackage.myServiceSpec.The getDomainObjs service must match by value(myServiceSpec.groovy:27) {code} -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
