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;
            }
        }
예제 #2
0
        public void DayTwoPartOneReturnsCorrectly(string input, int expected)
        {
            var result = DayTwo.PartOne(input);

            Assert.AreEqual(expected, result);
        }
예제 #3
0
        public void PartOne()
        {
            var dayTwo = new DayTwo();

            var output = dayTwo.PartOne(FilePath);
        }