예제 #1
0
        public void TestCountBoundRule()
        {
            IList <string> rawInputs = new List <string>
            {
                "1-3 a: abcde",
                "1-3 b: cdefg",
                "2-9 c: ccccccccc"
            };
            IList <PasswordInput> inputs   = rawInputs.Select(s => Day02.StringToPasswordInput(s)).ToList();
            IList <bool>          expected = new List <bool> {
                true, false, true
            };

            IList <bool> actual = Day02.EvaluatePasswords(inputs, Day02.CharCountBounded);

            Assert.IsTrue(expected.SequenceEqual(actual), "Password evaluation does not match expected.");
        }