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 DayTwoPartOneReturnsCorrectly(string input, int expected) { var result = DayTwo.PartOne(input); Assert.AreEqual(expected, result); }
public void PartOne() { var dayTwo = new DayTwo(); var output = dayTwo.PartOne(FilePath); }