Exemplo n.º 1
0
Arquivo: Day10.cs Projeto: stefc/AoC
        public void PuzzlePartOne()
        {
            //  Arrange
            var input = File
                        .ReadLines("tests/y2020/Day10.Input.txt")
                        .Select(x => Convert.ToInt32(x));

            // Act
            var actual = AdapterArray.CountJolt(input);

            // Assert
            Assert.Equal(1998, actual);
        }
Exemplo n.º 2
0
Arquivo: Day10.cs Projeto: stefc/AoC
        public void PuzzleOne()
        {
            // Arrange
            var input = new int[] {
                16, 10, 15, 5, 1, 11, 7, 19, 6, 12, 4
            };

            // Act
            var actual = AdapterArray.CountJolt(input);

            // Assert
            Assert.Equal(5 * 7, actual);
        }