Example #1
0
        public void PuzzlePartOne()
        {
            //  Arrange
            var input = File
                        .ReadLines("tests/y2020/Day2.Input.txt")
                        .ToList();

            // Act
            var actual = PasswordPhilosophy.AreValidCount(input);

            // Assert
            Assert.Equal(398, actual);
        }
Example #2
0
        public void PuzzleOne()
        {
            // Arrange
            var input = new string[] {
                "1-3 b: cdefg",
                "1-3 a: abcde",
                "2-9 c: ccccccccc"
            };

            // Act
            var actual = PasswordPhilosophy.AreValidCount(input);

            // Assert
            Assert.Equal(2, actual);
        }