We are facing an issue of passing FormCollection during unit testing. There is no way to simulate these form collections without setting individual parameters, it is a very difficult process to start each object value for large forms. I think there can be a simple way of doing this, do anyone know about this?
Instead of having to type the code to fill the FormCollection for each unit test, in your test class Make a method that generates a valid formulation that you can use for each test. You can add / remove / modify parameters from this "Base" formulation according to the requirements of each unit test. In this way, you only have to type the most code to fill the form code.
Comments
Post a Comment