Reputation: 3303
I started working with Spring MVC recently so I may be missing something obvious. I am using the Spring 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
Upvotes: 2
Views: 973
Reputation: 597106
Test whether the controller returns the correct data. The serialization mechanism is part of spring/jackson, and has been already tested there.
Upvotes: 4