public void TestPartOneSample() { string input = "swap position 4 with position 0\nswap letter d with letter b\n" + "reverse positions 0 through 4\nrotate left 1 step\nmove position 1 to position 4\n" + "move position 3 to position 0\nrotate based on position of letter b\nrotate based on position of letter d"; Assert.Equal("fbdecgha", Day21.PartOne(input.Split("\n"))); }
public void Day21Test1() { // arrange var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); path = Path.GetFullPath(Path.Combine(path, "..", "..", "..")); var inputFile = Directory.GetFiles(path + @"/TestInput", "Day21_1.txt")[0]; var day21 = new Day21(inputFile); // act var result1 = day21.PartOne(); var result2 = day21.PartTwo(); // assert Assert.Equal("5", result1); Assert.Equal("mxmxvkd,sqjhc,fvjkl", result2); }
public void TestPartOneInput() { string input = System.IO.File.ReadAllText("./Inputs/Day21.in"); Assert.Equal("bfheacgd", Day21.PartOne(input.Split("\r\n"))); }