Example #1
0
        protected async Task ShowResults()
        {
            if (ValidateTextbox())
            {
                invalid = false;
                DayFive _challengeSolver = new DayFive();

                await RefreshReport();

                if (_boardingPasses.Count > 0)
                {
                    _partOne = _challengeSolver.PartOne(_boardingPasses);
                    _partTwo = _challengeSolver.PartTwo(_boardingPasses);
                }

                if (_partOne != 0 && _partTwo != 0)
                {
                    childOne.Show();
                    childTwo.Show();
                }
                else
                {
                    invalid = true;
                }
            }
            else
            {
                invalid = true;
            }
        }
Example #2
0
        public void DayFivePartTwoReturnsCorrectly(string input, int expected)
        {
            var result = DayFive.PartTwo(input);

            Assert.AreEqual(expected, result);
        }