public void TestPart2Sample() { int expectedResult = 0; var lines = @"class: 0-1 or 4-19 row: 0-5 or 8-19 seat: 0-13 or 16-19 your ticket: 11,12,13 nearby tickets: 3,9,18 15,1,5 5,14,9".Split('\n'); var input = Day16Extensions.ParseInput(lines); Day16.ExecutePart2(input.rules, input.ticket, input.nearTickes).Should().Be(expectedResult); }
public void TestPart1Sample() { int expectedResult = 71; var lines = @"class: 1-3 or 5-7 row: 6-11 or 33-44 seat: 13-40 or 45-50 your ticket: 7,1,14 nearby tickets: 7,3,47 40,4,50 55,2,20 38,6,12".Split('\n'); var input = Day16Extensions.ParseInput(lines); Day16.ExecutePart1(input.rules, input.ticket, input.nearTickes).Should().Be(expectedResult); }