public Result First(List <string> input) { var scanner = new PassportScanner(input); int validPassports = scanner.NrOfPassportsWithRequiredFields(); return(new Result(validPassports)); }
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)); }
public override string First() { string fileName = GetFilename(); var scanner = new PassportScanner(fileName); scanner.Scan(); int validPassports = scanner.NrOfPassportsWithRequiredFields(); return(validPassports.ToString()); }