valerii.sverdlik
valerii.sverdlik

Reputation: 559

How to serialize the data on server similar to standard MVC client serializer?

In my MVC application when I submit the form serilized data is sent to a server via post request. I want to simulate the request on the server in order to provide integration testing. What serializer should I use?

Upvotes: 0

Views: 102

Answers (1)

George Stocker
George Stocker

Reputation: 57907

It would be better to mock the data sent in the post request for Unit testing (and even through automated integration testing). There are several Stack Overflow answers that would help you to mock the HttpRequest and HttpContext for testing, here is just one.

Upvotes: 1

Related Questions