Depends on what you redefine.
In general, mock HttpContextBase , create the necessary RouteData and use these two elements to create the ControllerContext .
Create your own RedirectResult , call ExecuteResult , passing in the previously created ControllerContext , and then create statements for the various fragments that you are mocking.
If you want a more complete answer, I will need more detailed information about what exactly your redefinition does.
source share