We are trying to write Unit Tests in our ASP.Net MVC project.
Some of the methods in the controller contain a call to Server.UrlDecode
This fails with a null reference exception when called from a unit test.
Anybody have a solution for this?
Use the static HttpUtility class and its UrlDecode method.
HttpUtility.UrlDecode(mystring);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With