예제 #1
0
        public void Find_FindsCorrectNumber_ForSecretKey(string secretKey, string expected)
        {
            var sut = new PasswordFinder(new PasswordPrefixValidator("00000"),
                                         new ResumableIntSequenceGenerator(start: 3231929));

            var actual = sut.Find(secretKey, 8);

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public static void Problem5()
        {
            var finder = new PasswordFinder(new PasswordPrefixValidator("00000"),
                                            new ResumableIntSequenceGenerator());

            var password = finder.Find("ugkcyxxp", 8);

            Console.WriteLine("Password = {0}", password);
        }