public void Should_ParseInputAndComputeCorrectMaxSignal() { var input = "3,26,1001,26,-4,26,3,27,1002,27,2,27,1,27,26,27,4,27,1001,28,-1,28,1005,28,6,99,0,0,5"; var expected = "139629729"; _streamReader = StreamHelper.GetStream(input); var result = new SevenPointFive().Run(_streamReader); Assert.Equal(expected, result); }
public void Should_ComputeCorrectMaxSignal(int expected, int[] data) { var result = new SevenPointFive().ComputeMaxSignal(data); Assert.Equal(expected, result); }
public void Should_ComputeCorrectSignal(int expected, int[] phaseSettings, int[] data) { var result = new SevenPointFive().ComputeSignal(phaseSettings.Select(IntCodeValue.FromInt).ToArray(), data); Assert.Equal(expected, result); }