public void FindPointTest() { var result = Day3.FindPointForNumber(16); Assert.Equal(new Point(2, 5), result); result = Day3.FindPointForNumber(10); Assert.Equal(new Point(5, 2), result); result = Day3.FindPointForNumber(25); Assert.Equal(new Point(5, 1), result); result = Day3.FindPointForNumber(9); Assert.Equal(new Point(3, 1), result); }
public void TestPartA() { string[] slopeDefinition = new string[] { "..##.......", "#...#...#..", ".#....#..#.", "..#.#...#.#", ".#...##..#.", "..#.##.....", ".#.#.#....#", ".#........#", "#.##...#...", "#...##....#", ".#..#...#.#" }; var data = new StringData(slopeDefinition); int expectedOutput = 7; Day3 day3 = new Day3(data); var actualOutut = day3.Puzzle1Solution(); Assert.AreEqual(expectedOutput, actualOutut); }
public void TestDay3Part2(string[] input, int answer) { Day3. Part2(input). ShouldBeEquivalentTo(answer); }
public void GeneratesProperCoordinates() { var day3 = new Day3(); }
public void Part2RealPuzzle() { var result = Day3.SolvePart2(GetPuzzleInput()); Assert.Equal(369601, result); }
public void Part2Tests(int input, int expected) { var result = Day3.SolvePart2(input); Assert.Equal(expected, result); }
public void CalculateGridSize(int input, int expected) { var result = Day3.CalculateGridSize(input); Assert.Equal(expected, result); }