Example #1
0
        public async Task Test_MultiplyHorizontalAndDepthPosition(string file, int?expectedValue = null)
        {
            // Arrange
            var textLines = await File.ReadAllLinesAsync(file);

            var puzzleInput = textLines
                              .Where(line => !string.IsNullOrWhiteSpace(line))
                              .ToList();

            var divePlanner = new Dive(puzzleInput);

            // Act
            var calculation = divePlanner.MultiplyHorizontalAndDepthPosition();

            // Assert
            Assert.IsTrue(calculation > 0);
            Debug.WriteLine(calculation);

            if (expectedValue.HasValue)
            {
                Assert.AreEqual(expectedValue, calculation);
            }
        }