//Checks login if incorrect pin is entered. public void checkPinTestIncorrectPin() { LogInProcess lg = new LogInProcess(); lg.InsertCard(card); bool result = lg.LogIn("1237"); Assert.IsFalse(result); }
//Checks login when Pin is correct. public void checkPinTestCorrect() { LogInProcess lg = new LogInProcess(); lg.InsertCard(card); bool result = lg.LogIn("1234"); Assert.IsTrue(result); }
//Checks login if the card number is null. public void checkPinTestnull() { LogInProcess lg = new LogInProcess(); lg.InsertCard(card); bool result = lg.LogIn(null); Assert.IsFalse(result); }
//checks if card is blocked after 3 incorrect attempts public void CheckPinBlocked() { LogInProcess lg = new LogInProcess(); lg.InsertCard(card); lg.LogIn("1"); lg.LogIn("1"); lg.LogIn("1"); Assert.IsTrue(card.IsBlocked); }
private void btnLogin_Click(object sender, RoutedEventArgs e) { //create Log In session LogInProcess myLogIn = new LogInProcess(); myLogIn.InsertCard(myCard); //myLogIn.LogIn(txtPWord.Text.ToString()); if (myLogIn.LogIn(pwordPassword.Password.ToString())) { //If login successful allow access to main menu MainMenu menu = new MainMenu(); menu.Show(); this.Close(); } else { pwordPassword.Password = "******"; } }