Exemple #1
0
        public void TestPartOne(string expected, string[] input)
        {
            Solver s      = new Day06Solver();
            string result = s.SolvePartOne(input);

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

            // Act
            var result = Day06Solver.Part1Solution(lines);

            // Assert
            Assert.Equal(expected, result);
        }
        public void TestSolvePartB()
        {
            Solver s = new Day06Solver();
            IEnumerable <string> input = new List <string>
            {
                "abc",
                "",
                "a",
                "b",
                "c",
                "",
                "ab",
                "ac",
                "",
                "a",
                "a",
                "a",
                "a",
                "",
                "b",
            };

            Assert.AreEqual("6", s.SolvePartB(input));
        }