I've a web page that has many constituent parts.
On some user action, a POST operation is made, which then returns JSON to update the page. The problem is that this JSON payload contains a lot of information built from many different operations and classes. The JSON data is used then to update a number of partial views via the Ajax callback.
My question is, what is the best way of unit testing this? Should this one action method even be responsible for collating all this information and returning in one chunk, or should it be done via a number of Html calls to different actions from the web page? That would I think be easier to unit test.
Currently I may write 8 tests against a single action which I generally have to mock a number of operations which are not needed for some tests.