I am working with an ASP.NET MVC solution in test mode and I want to log in to my application using forms authentication. The code I would like to get in the controller looks something like this:
FormsAuthentication.SetAuthCookie(userName, false);
My question is: how to write a test to justify this code?
Is there a way to check if the SetAuthCookie method was called with the correct parameters?
Is there any way to introduce fake / mock FormsAuthentication?
unit-testing tdd asp.net-mvc mocking forms-authentication
maz Dec 14 '08 at 10:48 2008-12-14 10:48
source share