Testing CustomObject marshallers in grails?
I'm trying to create custom object marshallers in grails, and a tutorial I was following indicated that the marshaller should be setup in BootStrap.groovy
in the init
closure. However, when I call myObject as JSON
in tests, the marshaller doesn't get used.开发者_开发问答
What do I need to do to use custom marshallers in tests?
You should be able to register the object marshaller any time before you use it. So to use it in a test, just add it to the setUp method.
This has been an issue in Grails since 1.2.4
, at least. There is an open JIRA ticket out there with no work being done.
精彩评论