Validate() public méthode

public Validate ( ) : bool
Résultat bool
Exemple #1
0
        public void min_required_non_alpha_chars_returns_false_when_3_required_non_alpha_chars_are_required_and_2_are_found()
        {
            // Arrange
            string password = "******";
            string username = "******";
            int numOfRequiredNonAlphaChars = 3;

            // Act
            var rule = new MinRequiredNonAlphanumericCharacters(username, password, numOfRequiredNonAlphaChars);
            bool actual = rule.Validate();

            // Assert
            Assert.IsFalse(actual);
        }
Exemple #2
0
        public void min_required_non_alpha_chars_returns_true_when_zero_required_non_alpha_chars_are_required()
        {
            // Arrange
            string password = "******";
            string username = "******";
            int numOfRequiredNonAlphaChars = 0;

            // Act
            var rule = new MinRequiredNonAlphanumericCharacters(username, password, numOfRequiredNonAlphaChars);
            bool actual = rule.Validate();

            // Assert
            Assert.IsTrue(actual);
        }