コード例 #1
0
        public virtual void TestUserIdentityProvider()
        {
            UserIdentityProvider uip = new UserIdentityProvider();
            string identity          = uip.MakeIdentity(new TestIdentityProviders.FakeSchedulable(this
                                                                                                  ));
            // Get our username
            UserGroupInformation ugi = UserGroupInformation.GetCurrentUser();
            string username          = ugi.GetUserName();

            Assert.Equal(username, identity);
        }