10
I want to mockup IPrincipal so I did this
public Mock<IPrincipal> Principal { get; set; }
in my setup of my nunit
Principal = new Mock<IPrincipal>();
So this should be all that I need in my nunit unit test but how about in my actual controller file?
Like how do I set it up?
For example I have a membership.Provider
So what I did was in my controller constructor I did
Provider = Membership.Provider;
So then in my controller I just used Provider.(whatever I need).
I am not sure how to setup the Principal thing in the same way.