Exemple #1
0
        public void IsValid_TesteProposto7()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Sem especial passou!");
        }
Exemple #2
0
        public void IsValid_TesteProposto6()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Com repetição de maiúscula passou!");
        }
Exemple #3
0
        public void IsValid_TesteProposto1()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "String vazia passou!");
        }
Exemple #4
0
        public void IsValid_WhiteSpace_Test1()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Senha com 1 espaço em branco passou!");
        }
Exemple #5
0
        public void IsValid_TesteProposto4()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Menos de 9, com repetição, sem dígito, com maiúscula, sem especial passou!");
        }
Exemple #6
0
        public void IsValid_Definition4_Test1()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Senha com 0 letras maiúsculas passou!");
        }
Exemple #7
0
        public void IsValid_Definition6_Test1()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Senha com 1 repetição passou!");
        }
Exemple #8
0
        public void IsValid_Definition5_Test1()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Senha com 0 caracteres especiais passou!");
        }
Exemple #9
0
        public void IsValid_Definition2_Test1()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Senha com 0 dígitos passou!");
        }
Exemple #10
0
        public void IsValid_Definition1_Test5()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "Senha tamanho 0 passou!");
        }
Exemple #11
0
        public void IsValid_Definition1_Test4()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsTrue(result, "Senha tamanho 10 não passou!");
        }
Exemple #12
0
        public void IsValid_Definition1_Test1()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = null;

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsFalse(result, "String nulla passou!");
        }
Exemple #13
0
        public void IsValid_TesteProposto8()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string password         = "******";

            // Act
            bool result = passwordBUsiness.IsValid(password);

            // Assert
            Assert.IsTrue(result, "Senha válida não passou!");
        }
Exemple #14
0
        public void IsValid_Definition5_Test2()
        {
            // Arrange
            var    passwordBUsiness = new PasswordBusiness();
            string passwordBase     = "abTp1fok";
            string specialChars     = "!@#$%^&*()-+";

            bool   result;
            string password;

            foreach (char c in specialChars)
            {
                // Arrange
                password = passwordBase + c;

                // Act
                result = passwordBUsiness.IsValid(password);

                // Assert
                Assert.IsTrue(result, $"Senha com 1 caracter especial não passou![{password}]");
            }
        }