コード例 #1
0
        public void TestCountValidPassportsEmpty()
        {
            string[] rawPassports       = new string[] { "xx:yy" };
            int      nuOfValidPassports = PassportValidator.CountValidPassports(rawPassports);

            Assert.AreEqual(0, nuOfValidPassports);
        }
コード例 #2
0
        public void TestCountValidPassports()
        {
            string[] rawPassports       = PassportValidator.GetInputData(FilePathTestData);
            int      nuOfValidPassports = PassportValidator.CountValidPassports(rawPassports);

            Assert.AreEqual(2, nuOfValidPassports);
        }
コード例 #3
0
        public void FindAnserDayFourPuzzleOne()
        {
            string[] rawPassports       = PassportValidator.GetInputData(FilePathInputData);
            int      nuOfValidPassports = PassportValidator.CountValidPassports(rawPassports);

            Console.WriteLine("Number of valid passports: " + nuOfValidPassports);
            Assert.AreEqual(228, nuOfValidPassports);
        }