Пример #1
0
        public void TestUser_CredentialsShouldNotBeExpired()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual(true, user.principal.credentialsNonExpired);
        }
Пример #2
0
        public void TestUser_PrincipalAuthorityShouldBeFan()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual("ROLE_FAN", user.principal.authorities[0].authority);
        }
Пример #3
0
        public void TestUser_ShouldNotBeLocked()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual(true, user.principal.accountNonLocked);
        }
Пример #4
0
        public void TestUser_ShouldBeAuthenticated()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual(true, user.authenticated);
        }
Пример #5
0
        public void TestUser_RemoteAddressShouldBeFilled()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreNotEqual(null, user.details.remoteAddress);
        }
Пример #6
0
        public void TestUsername_ShouldEqualAuthorizations()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual(auth.GetCredential(null, null).UserName.ToLower(), user.principal.username.ToLower());
        }
Пример #7
0
        public void TestPassword_ShouldBeNull()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual(null, user.principal.password);
        }
Пример #8
0
        public void TestAuthorization()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreNotEqual(null, user);
        }
Пример #9
0
        public void TestUser_CredentialsShouldBeNull()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual(null, user.credentials);
        }
Пример #10
0
        public void TestUser_ShouldBeEnabled()
        {
            UserDTO user = RequestHandler.GetUser();

            Assert.AreEqual(true, user.principal.enabled);
        }