How to mock Request.Files[] in MVC unit test class?
- by kapil
I want to test a controller method in MVC unit test.
For my controller method to test, I require a Request.Files[] collection with length one.
I want to mock Request.Files[] as I have used a file upload control on my view rendered by controller method.
Can anyone please suggest how can I mock request.file collection in my unit test.
thanks,
kapil