Exemplo n.º 1
0
        public Result First(List <string> input)
        {
            var scanner        = new PassportScanner(input);
            int validPassports = scanner.NrOfPassportsWithRequiredFields();

            return(new Result(validPassports));
        }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
        public override string First()
        {
            string fileName = GetFilename();
            var    scanner  = new PassportScanner(fileName);

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

            return(validPassports.ToString());
        }