예제 #1
0
        public void TestPartOneSample()
        {
            string input = "cpy 2 a\ntgl a\ntgl a\ntgl a\n" +
                           "cpy 1 a\ndec a\ndec a";

            Assert.Equal(3, Day23.PartOne(input.Split("\n")));
        }
예제 #2
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);
        }
예제 #3
0
        public void TestPartOneInput()
        {
            string input = System.IO.File.ReadAllText("./Inputs/Day23.in");

            Assert.Equal(10440, Day23.PartOne(input.Split("\r\n")));
        }