Creating a UrlHelper with ActionContext() results in a NullReferenceException #6703
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
✔️ Resolution: By Design
Resolved because the behavior in this issue is the intended design.
Describe the bug
Trying to create a URLHelper for testing purposes with the help of ActionContext() throws a NullReferenceException.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Throws Message: System.NullReferenceException : Object reference not set to an instance of an object.
Additional context
Bug report can also be found on StackOverflow:
https://stackoverflow.com/questions/54199103/trying-to-test-a-controller-with-a-urlhelper
The text was updated successfully, but these errors were encountered: