public void TestPartOneSample()
        {
            string input = "..^^.";

            Assert.Equal(6, Day18.PartOne(input, 3));
            input = ".^^.^.^^^^";
            Assert.Equal(38, Day18.PartOne(input, 10));
        }
Example #2
0
        public void Day18Test1()
        {
            // arrange
            var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

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

            var inputFile = Directory.GetFiles(path + @"/TestInput", "Day18_1.txt")[0];
            var day18     = new Day18(inputFile);

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

            // assert
            Assert.Equal("26457", result1);
            Assert.Equal("694173", result2);
        }
        public void TestPartOneInput()
        {
            string input = System.IO.File.ReadAllText("./Inputs/Day18.in");

            Assert.Equal(2035, Day18.PartOne(input, 40));
        }