public void SolveSecondPuzzle() { var sut = HydrothermalVentReport.CreateReportSupportingDiagonals(REAL_INPUT); Assert.Equal(21140, sut.CalculateAmountOfOverlappingPoints()); }
public void CalculateOverlappingPointsCorrectly_WhenIncludingDiagonals() { var sut = HydrothermalVentReport.CreateReportSupportingDiagonals(SAMPLE_INPUT); Assert.Equal(12, sut.CalculateAmountOfOverlappingPoints()); }
public void SupportDiagonalLines(string input, int expectedCount) { var sut = HydrothermalVentReport.CreateReportSupportingDiagonals(input); Assert.Equal(expectedCount, sut.CalculateAmountOfOverlappingPoints()); }
public void CalculateOverlappingPoitnsCorrectly_WhenNotIncludingDiagonals(string input, int expectedCount) { var sut = HydrothermalVentReport.CreateReportNotSupportingDiagonals(input); Assert.Equal(expectedCount, sut.CalculateAmountOfOverlappingPoints()); }
public void GenerateLinesCorrectly(string singleHorizontalLine, int expectedPoints) { var sut = HydrothermalVentReport.CreateReportNotSupportingDiagonals(singleHorizontalLine); Assert.Equal(expectedPoints, sut.CalculateAmountOfOverlappingPoints()); }
public void BeInitializedCorrectly(string invalidReport) { var exception = Assert.Throws <ArgumentException>(() => HydrothermalVentReport.CreateReportNotSupportingDiagonals(invalidReport)); Assert.Equal("Invalid input", exception.Message); }