public PartOne(ITestOutputHelper output) { var recorder = output.ToComputationRecorder(); _optCodeComputer = new OptCodeComputer(recorder, 1); this.output = output; }
public void Output() { int[] sequence = new int[] { 4, 1, 99 }; var recorder = output.ToComputationRecorder(); var optComputer = new OptCodeComputer(recorder, 1); optComputer.Output(ref sequence); }
public void Input() { int[] sequence = new int[] { 3, 2, 0 }; const int input = 99; int[] expectedResult = new int[] { 3, 2, input }; var recorder = output.ToComputationRecorder(); var optComputer = new OptCodeComputer(recorder, input); optComputer.Output(ref sequence); sequence.Should().BeEquivalentTo(expectedResult); }
public PartTwo() { var recorder = _instructions.ToComputationRecorder(); _optCodeComputer = new OptCodeComputer(recorder, 5); }