public void VerifyThatPasswordIsCorrect_WhenAtLeastThreeOptionalConditionsAreTrue()
        {
            var passwordVerifier = new PasswordVerifier();

            Action action = () => passwordVerifier.Verify("EEEeee11");

            action.ShouldNotThrow <Exception>();
        }
        public void ThrowsException_WhenPasswordDoesntSatisfiedNumberConditionAndAtLeastOneMoreConditionIsNotSatisfied(string passwordWhichDoesntContainsNumberAndOneMoreFailingCondition)
        {
            var passwordVerifier = new PasswordVerifier();

            Action action = () => passwordVerifier.Verify(passwordWhichDoesntContainsNumberAndOneMoreFailingCondition);

            action.ShouldThrow <Exception>().Which.Message.Should().Contain("Password must have at least 1 number.");
        }
        public void ThrowsException_WhenPasswordDoesntSatisfiedLowercaseCondition(string passwordWhichDoesntContainsLowercaseCharacter)
        {
            var passwordVerifier = new PasswordVerifier();

            Action action = () => passwordVerifier.Verify(passwordWhichDoesntContainsLowercaseCharacter);

            action.ShouldThrow <Exception>().Which.Message.Should().Be("Password must have at least 1 lowercase letter.");
        }
        public void ThrowException_WhenMinimumConditionsAreNotSatisfiedAndOneOfThemIsUppercaseLetterCondition(string passwordWhichDoesntContainsUpercaseCharacterAndOneMoreFailingCondition)
        {
            var passwordVerifier = new PasswordVerifier();

            Action action = () => passwordVerifier.Verify(passwordWhichDoesntContainsUpercaseCharacterAndOneMoreFailingCondition);

            action.ShouldThrow <Exception>().Which.Message.Should().Contain("Password must have at least 1 uppercase letter.");
        }
        public void VerifyThatPasswordIsNotNull()
        {
            var passwordVerifier = new PasswordVerifier();

            Action action = () => passwordVerifier.Verify(null);

            action.ShouldThrow <Exception>().Which.Message.Should().Be("Password can't be null.");
        }
        public void ThrowException_WhenMinimumConditionsAreNotSatisfiedAndOneOfThemIsPasswordMinimumLenght(string passwordWhichIsNotLongerThanEightCharactersAndOneMoreFailingCondition)
        {
            var passwordVerifier = new PasswordVerifier();

            Action action = () => passwordVerifier.Verify(passwordWhichIsNotLongerThanEightCharactersAndOneMoreFailingCondition);

            action.ShouldThrow <Exception>().Which.Message.Should().Contain("Password must be longer than 8 characters.");
        }