Exemplo n.º 1
0
        public void TestPartTwo(string expected, string[] input)
        {
            Solver s      = new Day16Solver();
            string result = s.SolvePartTwo(input);

            Assert.That(result, Is.EqualTo(expected));
        }
Exemplo n.º 2
0
        public void TestPartOne(string expected, string[] input, int phases)
        {
            Day16Solver s      = new Day16Solver();
            string      result = s.SolvePartOne(input, phases);

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

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

            // Assert
            Assert.Equal(expected, result);
        }
Exemplo n.º 4
0
        public void TestPart2Solution(string inputFile, int expected)
        {
            // Arrange
            int[] lines = Helpers.ReadDigits($"../../../{inputFile}").ToArray();

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

            // Assert
            Assert.Equal(expected, result);
        }
Exemplo n.º 5
0
 public void CalculatePatternTest(string input, int phase, string expectedPhase)
 {
     Assert.AreEqual(expectedPhase, Day16Solver.IntListToString((new Day16Solver(input)).CalculatePattern(phase)).Substring(0, expectedPhase.Length));
 }
Exemplo n.º 6
0
 public void SetUp()
 {
     _solver = new Day16Solver();
     _input  = new Day16Input();
 }