If you want to unit test your controllers at some stage, you'll want to test your Action Results. In Epi-Server, it is very likely you may want to Redirect to another episerver page from an MVC controller, e.g. a redirect to any page, after login, or a redirect to the start page.  In order to do this you can still use RedirectToAction with Episerver, however, you will also need to supply the content reference of the page in the node tag.  Now, you want to unit test your redirect.. how do you do it ?

I'm using FluentAssertions to do the assert checks. In our test, we return the ActionResult and type it as a 'RedirectToRouteResult'. After that, you can then look in the RouteValues collection for the 'node' tag and it should contain the page ID you want to test.

Testing Response.Redirect

In some of your controllers, you may do a complete direct based on a URL, etc.. to do this you check for a RedirectResult and make sure the URL property contains the value you are expecting.