Esempio n. 1
0
        private void ExecuteSubmit(object commandParameter)
        {
            var accessControlSystem = commandParameter as SmartLoginOverlay;

            if (accessControlSystem != null)
            {
                if (loginPresenter.Authenticate(this.UserNameField, this.PasswordField))
                {
                    accessControlSystem.Unlock();
                    loginCompleteAction();
                }
                else
                {
                    accessControlSystem.ShowWrongCredentialsMessage();
                }
            }
        }
Esempio n. 2
0
 public void PresenterTest_Authentication()
 {
     // Result from presenter should be the same as authenticator.
     Assert.AreEqual(loginPresenter.Authenticate("admin", "fullaccess"), Authenticator.Login("admin", "fullaccess"));
     Assert.AreEqual(loginPresenter.Authenticate("random", "pass"), Authenticator.Login("random", "pass"));
 }