public static void SimulateLogin() { TestIdentity identity = new TestIdentity("User", "password"); TestPrincipal p = new TestPrincipal(identity); Csla.ApplicationContext.User = p; //System.Threading.Thread.CurrentPrincipal = p; }
public override bool IsInRole(string role) { TestIdentity identity = (TestIdentity)(this.Identity); return(identity.IsInRole(role)); }