public void PasswordIsCorrect(string doorId, int length, int charactersToFill, int index, string expected) { var sut = new Day5Part2(doorId, length); var actual = sut.GetPassword(charactersToFill, index); Assert.Equal(expected, actual); }
public void TestPart2(string program, string input, string expectedOutput) { var splitInput = input.Split(",", StringSplitOptions.RemoveEmptyEntries); var testIO = new TestIOSystem(splitInput); var day1 = new Day5Part2(testIO); var val = day1.RunProgram(program); var result = testIO.GetAllInput().FirstOrDefault() ?? ""; result.ShouldBe(expectedOutput); }