예제 #1
0
        public Result First(List <string> input)
        {
            var scanner        = new PassportScanner(input);
            int validPassports = scanner.NrOfPassportsWithRequiredFields();

            return(new Result(validPassports));
        }
예제 #2
0
        public TestResult Test(List <string> input)
        {
            var  scanner        = new PassportScanner(input);
            int  validPassports = scanner.NrOfPassportsWithRequiredFields();
            var  expected       = 2;
            bool succeded       = validPassports == expected;

            return(new TestResult(succeded, expected, validPassports));
        }
예제 #3
0
        public override string First()
        {
            string fileName = GetFilename();
            var    scanner  = new PassportScanner(fileName);

            scanner.Scan();
            int validPassports = scanner.NrOfPassportsWithRequiredFields();

            return(validPassports.ToString());
        }