public async Task TestDay8Part1() { var inputMock = PrepareInput(); var objUnderTest = new Day8(inputMock.Object); Assert.That(await objUnderTest.Part1(), Is.EqualTo(26)); }
public void Part1Test() { string[] input = { "b inc 5 if a > 1", "a inc 1 if b < 5", "c dec -10 if a >= 1", "c inc -20 if c == 10" }; Assert.AreEqual(Day8.Part1(input), 1); }
public void TestData() { _day8.Part1(); Assert.AreEqual(116, _day8.ActivePixels); }
internal void Handle() { Day d = new Day(0); switch (selected + 1) { case 1: d = new Day1(GetPath("Day1-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 2: d = new Day2(GetPath("Day2-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 3: d = new Day3(GetPath("Day3-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1Long())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2Long())); break; case 4: d = new Day4(GetPath("Day4-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 5: d = new Day5(GetPath("Day5-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 6: d = new Day6(GetPath("Day6-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 7: d = new Day7(GetPath("Day7-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 8: d = new Day8(GetPath("Day8-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 9: d = new Day9(GetPath("Day9-Part1.txt"), 25); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1Long())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2Long())); break; case 10: d = new Day10(GetPath("Day10-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2Long())); break; case 11: d = new Day11(GetPath("Day11-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 12: d = new Day12(GetPath("Day12-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2())); break; case 13: d = new Day13(GetPath("Day13-Part1.txt")); Console.WriteLine(String.Format("Result Part 1: {0}", d.Part1Long())); Console.WriteLine(String.Format("Result Part 2: {0}", d.Part2Long())); break; } Console.WriteLine("Press any key to continue"); Console.ReadKey(); }
public void Part1(string input, int output) { var result = Day8.Part1(input); Assert.True(result == output, $"Expected: {output}, Received: {result}"); }
public void Part1_real_test() { Assert.That(Day8.Part1(_input), Is.EqualTo(43825)); }
public void Part1_simple_test() { Assert.That(Day8.Part1(_simpleTestInput), Is.EqualTo(138)); }
public void TestPart1() { Assert.AreEqual(5, d.Part1()); }