Ejemplo n.º 1
0
        public void TestPartOne(string expected, string[] input)
        {
            Solver s      = new Day05Solver();
            string result = s.SolvePartOne(input);

            Assert.That(result, Is.EqualTo(expected));
        }
Ejemplo n.º 2
0
        public void TestPart2Solution(string inputFile, int expected)
        {
            // Arrange
            string[] lines = System.IO.File.ReadAllLines($"../../../{inputFile}");

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

            // Assert
            Assert.Equal(expected, result);
        }
Ejemplo n.º 3
0
        public void TestSolvePartA()
        {
            Solver s = new Day05Solver();
            IEnumerable <string> input = new List <string>
            {
                "BFFFBBFRRR",
                "FFFBBBFRRR",
                "BBFFBBFRLL"
            };

            Assert.AreEqual("820", s.SolvePartA(input));
        }