Example #1
0
        public void LoginAndCreateUser()
        {
            database.Users.Clear();
            authenticationLogic.CreateUser("Kees", "MyPassword123");

            Assert.IsTrue(authenticationLogic.Login("Kees", "MyPassword123"));
        }
Example #2
0
 private void BtnLogin_Click(object sender, EventArgs e)
 {
     if (authenticationLogic.Login(TxtUsername.Text, TxtPassword.Text))
     {
         UserInterface userInterface = new UserInterface();
         userInterface.Show();
         this.Dispose();
     }
     else
     {
         MessageBox.Show("Inlog gegevens incorrect, weet je zeker dat je wachtwoord klopt?", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }