Example #1
0
        public void Day23Test1()
        {
            // arrange
            var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            path = Path.GetFullPath(Path.Combine(path, "..", "..", ".."));

            var inputFile = Directory.GetFiles(path + @"/TestInput", "Day23_1.txt")[0];
            var day23     = new Day23(inputFile);

            // act
            var result1 = day23.PartOne();
            var result2 = day23.PartTwo();

            // assert
            Assert.Equal("67384529", result1);
            Assert.Equal("149245887792", result2);
        }
Example #2
0
        public void TestPartTwoInput()
        {
            string input = System.IO.File.ReadAllText("./Inputs/Day23.in");

            Assert.Equal(479007000, Day23.PartTwo(input.Split("\r\n")));
        }
Example #3
0
        public void TestPartTwoSample()
        {
            string input = "\n";

            Assert.Equal(3, Day23.PartTwo(input.Split("\n")));
        }