Ejemplo n.º 1
0
        public void ActiveDirectoryAuthenticator_Authenticate_ProvideInvalidCredentials_ReturnsFalse()
        {
            ActiveDirectoryRepository activeDirectoryAuthenticator = new ActiveDirectoryRepository();

            bool isAuthenticated = activeDirectoryAuthenticator.Authenticate(username, invalidPassword, domain);

            //Authenticate with validate credentials just to reset the bad password count
            activeDirectoryAuthenticator.Authenticate(username, password, domain);

            Assert.IsFalse(isAuthenticated);
        }
Ejemplo n.º 2
0
        public void ActiveDirectoryAuthenticator_Authenticate_ProvideValidCredentials_ReturnsTrue()
        {
            ActiveDirectoryRepository activeDirectoryAuthenticator = new ActiveDirectoryRepository();

            bool isAuthenticated = activeDirectoryAuthenticator.Authenticate(username, password, domain);

            Assert.IsTrue(isAuthenticated);
        }