Beispiel #1
0
        public void SolveFirstPuzzle()
        {
            var sut = HydrothermalVentReport.CreateReportNotSupportingDiagonals(REAL_INPUT);

            Assert.Equal(7269, sut.CalculateAmountOfOverlappingPoints());
        }
Beispiel #2
0
        public void GenerateLinesCorrectly(string singleHorizontalLine, int expectedPoints)
        {
            var sut = HydrothermalVentReport.CreateReportNotSupportingDiagonals(singleHorizontalLine);

            Assert.Equal(expectedPoints, sut.CalculateAmountOfOverlappingPoints());
        }
Beispiel #3
0
        public void CalculateOverlappingPoitnsCorrectly_WhenNotIncludingDiagonals(string input, int expectedCount)
        {
            var sut = HydrothermalVentReport.CreateReportNotSupportingDiagonals(input);

            Assert.Equal(expectedCount, sut.CalculateAmountOfOverlappingPoints());
        }
Beispiel #4
0
        public void BeInitializedCorrectly(string invalidReport)
        {
            var exception = Assert.Throws <ArgumentException>(() => HydrothermalVentReport.CreateReportNotSupportingDiagonals(invalidReport));

            Assert.Equal("Invalid input", exception.Message);
        }