I am trying to unit test an ASP.NET MVC 4 controller that is returning Kendo.UI.Mvc DataSource result wrapped as Json. The problem is that I cannot get to the returned the actual data .. it is always null.
The question is, how do I validate the JSON coming back from a Controller that wraps the Kendo.UI DataSourceResult.
This problem was infuriating because I could see the collection of data I wanted in VS while debugging. I have updated the test fixture – asserts on the model data can be performed.
Basically I did the following:
Controller:
Unit Test: