コード例 #1
0
        public void TestPasswordDatabaseEntryFromOldJob(string entry, string password, char letter, int letterMinOccur, int letterMaxOccur)
        {
            var passwordDatabaseEntry = new day02.PasswordDatabaseEntryFromOldJob(entry);

            passwordDatabaseEntry.Password.ShouldBe(password);
            passwordDatabaseEntry.PasswordPolicyLetter.ShouldBe(letter);
            passwordDatabaseEntry.PasswordPolicyLetterMinOccur.ShouldBe(letterMinOccur);
            passwordDatabaseEntry.PasswordPolicyLetterMaxOccur.ShouldBe(letterMaxOccur);
        }
コード例 #2
0
        public void TestValidPasswordFromOldJob(string entry, bool validPassword)
        {
            var passwordDatabaseEntry = new day02.PasswordDatabaseEntryFromOldJob(entry);

            passwordDatabaseEntry.ValidPassword.ShouldBe(validPassword);
        }