protected async Task ShowResults() { if (ValidateTextbox()) { invalid = false; DayTwo _challengeSolver = new DayTwo(); _partOne = 0; _partTwo = 0; await RefreshReport(); if (_passwords.Count > 0) { _partOne = _challengeSolver.PartOne(_passwords); _partTwo = _challengeSolver.PartTwo(_passwords); } if (_partOne != 0 && _partTwo != 0) { childOne.Show(); childTwo.Show(); } else { invalid = true; } } else { invalid = true; } }
public void PartTwo() { var dayTwo = new DayTwo(); var output = new string(dayTwo.PartTwo(FilePath).ToArray()); }
public void DayTwoPartTwoReturnsCorrectly(string input, int expected) { var result = DayTwo.PartTwo(input); Assert.AreEqual(expected, result); }
private static void DayTwoInput() { var file = File.ReadAllText("bin/Debug/netcoreapp2.0/Inputs/DayTwo.txt"); Console.WriteLine(DayTwo.PartTwo(file)); }