Example #1
0
        public void SolutionPart1()
        {
            // Arrange
            string filePath = $"{new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName}/Day3/Resources/input.txt";
            Day3   day      = new Day3();

            // Act
            var result = day.Compute(filePath, new List <Day3.Slope> {
                new Day3.Slope {
                    Right = 3, Bottom = 1
                }
            });

            // Result
            _output.WriteLine(result.ToString());
        }
Example #2
0
        public void Test1Part1()
        {
            // Arrange
            string filePath = $"{new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName}/Day3/Resources/test.txt";
            Day3   day      = new Day3();

            // Act
            var result = day.Compute(filePath, new List <Day3.Slope> {
                new Day3.Slope {
                    Right = 3, Bottom = 1
                }
            });

            // Assert
            result.Should().Be(7);
        }