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);
        }
Ejemplo n.º 3
0
        public void Get()
        {
            Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity("Identity"), new string[0]);
            var source = new ThreadPrincipalSource();

            Assert.Same(Thread.CurrentPrincipal, source.Value);
        }
Ejemplo n.º 4
0
        public void Set()
        {
            var source = new ThreadPrincipalSource();

            source.Value = new GenericPrincipal(new GenericIdentity("Identity"), new string[0]);

            Assert.Same(source.Value, Thread.CurrentPrincipal);
        }