예제 #1
0
        public void TestPartTwo(string expected, int count, int x, int y, string[] input)
        {
            Day10Solver s      = new Day10Solver();
            string      result = s.SolvePartTwo(input, count, x, y);

            Assert.That(result, Is.EqualTo(expected));
        }
예제 #2
0
        public void TestPartOne(string expected, string[] input)
        {
            Solver s      = new Day10Solver();
            string result = s.SolvePartOne(input);

            Assert.That(result, Is.EqualTo(expected));
        }
예제 #3
0
        public void TestPart2Solution(string inputFile, long expected)
        {
            // Arrange
            string[] lines = System.IO.File.ReadAllLines($"../../../{inputFile}");

            // Act
            var result = Day10Solver.Part2Solution(lines);

            // Assert
            Assert.Equal(expected, result);
        }
예제 #4
0
        public void TestPart2Solution(string inputFile, int expected)
        {
            // Arrange
            string[][] asteroidMap = Helpers.ReadAsteroidMap($"../../../{inputFile}");

            // Act
            var result = Day10Solver.Part2Solution(asteroidMap);

            // Assert
            Assert.Equal(expected, result);
        }
        public void TestSolvePartB()
        {
            Solver s = new Day10Solver();
            IEnumerable <string> input = new List <string>
            {
                "28",
                "33",
                "18",
                "42",
                "31",
                "14",
                "46",
                "20",
                "48",
                "47",
                "24",
                "23",
                "49",
                "45",
                "19",
                "38",
                "39",
                "11",
                "1",
                "32",
                "25",
                "35",
                "8",
                "17",
                "7",
                "9",
                "4",
                "2",
                "34",
                "10",
                "3"
            };

            Assert.AreEqual("19208", s.SolvePartB(input));
        }
예제 #6
0
		public void SetUp()
		{
			_solver = new Day10Solver();
			_parser = new Day10Parser();
		}
예제 #7
0
 public void SetUp()
 {
     _solver = new Day10Solver();
     _input  = new Day10Input();
 }