Exemple #1
0
        public void PasswordDataConstruction()
        {
            string input        = "1-3 a: abcde";
            var    passwordData = new PasswordData(input);

            Assert.Equal("abcde", passwordData.Password);
            Assert.Equal('a', passwordData.RequiredLetter);
            Assert.Equal(1, passwordData.LowerLimit);
            Assert.Equal(3, passwordData.UpperLimit);

            Assert.True(passwordData.IsValidSledRentalRules());
        }
Exemple #2
0
        public void PasswordData_IsValidSledRentalRules(string input, bool expected)
        {
            var passwordData = new PasswordData(input);

            Assert.Equal(expected, passwordData.IsValidSledRentalRules());
        }