开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜