Unit tests for Spring JsonView
I started working with Spring MVC recently so I may be missing something obvious. I am using the Spr开发者_运维技巧ing MVC JsonView view and I would like to unit test the json that's being returned by the controller to make sure that all data is serialized correctly.
Is there any way to do this? If I test my model in the controller, this is before serialization so that doesn't really help me for this particular case.
Thank you
Test whether the controller returns the correct data. The serialization mechanism is part of spring/jackson, and has been already tested there.
精彩评论