public void СanEnter_NotValidLogin_NotValidPassword_ReturnFalse()
        {
            ValidationServise service = new ValidationServise();
            bool result = service.СanEnter("adminn", "adminn", new Label(), 10);

            Assert.IsFalse(result);
        }
Пример #2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            bool loginValid    = service.LoginValidation(loginTextBox.Text, errorLabel, emptyLoginLabel, loginTextBox.Width);
            bool passwordValid = service.PasswordValidation(passwordBox.Password, errorLabel, emptyPasswordLabel, loginTextBox.Width);
            bool canEnter      = service.СanEnter(loginTextBox.Text, passwordBox.Password, errorLabel, loginTextBox.Width);

            if (loginValid & passwordValid & canEnter)
            {
                NavigationService.Navigate(new AdminPage());
            }
        }