Example #1
0
        public void Calculates_Number_Of_Valid_Passwords_In_Input()
        {
            var numberOfValidPasswords = File.ReadLines("input.txt").Select(x => PasswordValidator.IsValid(x, PasswordPolicy.TobogganCorporate)).Count(x => x);

            numberOfValidPasswords.Should().Be(694);
        }
Example #2
0
        public void Calculates_Number_Of_Valid_Passwords_In_Input()
        {
            var numberOfValidPasswords = File.ReadLines("input.txt").Select(x => PasswordValidator.IsValid(x)).Count(x => x);

            numberOfValidPasswords.Should().Be(410);
        }
Example #3
0
 public void PasswordValidator_Validates_Passwords_In_Example(string passwordLine, bool isValid)
 {
     PasswordValidator.IsValid(passwordLine, PasswordPolicy.TobogganCorporate).Should().Be(isValid);
 }
Example #4
0
 public void PasswordValidator_Validates_Passwords_In_Example(string passwordLine, bool isValid)
 {
     PasswordValidator.IsValid(passwordLine).Should().Be(isValid);
 }