示例#1
0
        public void PartTwoTest()
        {
            var subject = new TicketTranslator(GetPartTwoExample());

            Assert.Equal(11, subject.YourTicketValidator("row"));
            Assert.Equal(12, subject.YourTicketValidator("class"));
            Assert.Equal(13, subject.YourTicketValidator("seat"));
        }
示例#2
0
        static void Main(string[] args)
        {
            var ticketTranslator = new TicketTranslator(File.ReadAllLines("../input.txt"));

            //Part One
            Console.WriteLine(ticketTranslator.NearbyTicketValidator());

            //Part Two
            Console.WriteLine(ticketTranslator.YourTicketValidator("departure"));
        }