public void Set() { var source = new ThreadPrincipalSource(); source.Value = new GenericPrincipal(new GenericIdentity("Identity"), new string[0]); Assert.Same(source.Value, Thread.CurrentPrincipal); }
public void Get() { Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity("Identity"), new string[0]); var source = new ThreadPrincipalSource(); Assert.Same(Thread.CurrentPrincipal, source.Value); }