예제 #1
0
        public void DayFive_PartTwo_ReturnsNumberOfStepsWithPossibleDecreaseInOffset()
        {
            var input      = File.ReadAllLines($"{inputsPrefix}Day5.txt");
            var collection = new InstructionSetDaySix(input);

            collection.PerformInstructionsPartTwo();

            Assert.Equal(25071947, collection.StepsTaken);
        }
        public void PerformInstructionsPartTwoShould_CountStepsWithDecrementIfOffsetOverThree()
        {
            var collection = new InstructionSetDaySix(inputTwo);

            collection.PerformInstructionsPartTwo();

            Assert.Equal(24, collection.StepsTaken);

            var oneCollection = new InstructionSetDaySix(inputTwo);

            oneCollection.PerformInstructionsPartOne();
            Assert.Equal(12, oneCollection.StepsTaken);
        }