Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Helpers/ExportableFailureMechanismSectionHelperTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -rbcf12c2daeb3cd243268ae1e8f21717e45fa5dae --- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Helpers/ExportableFailureMechanismSectionHelperTest.cs (.../ExportableFailureMechanismSectionHelperTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Helpers/ExportableFailureMechanismSectionHelperTest.cs (.../ExportableFailureMechanismSectionHelperTest.cs) (revision bcf12c2daeb3cd243268ae1e8f21717e45fa5dae) @@ -93,122 +93,5 @@ Assert.AreEqual(20, thirdExportableSection.StartDistance); Assert.AreEqual(40, thirdExportableSection.EndDistance); } - - [Test] - public void GetFailureMechanismSectionGeometry_ReferenceLineNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => ExportableFailureMechanismSectionHelper.GetFailureMechanismSectionGeometry(null, 0, 0); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("referenceLine", exception.ParamName); - } - - [Test] - public void GetFailureMechanismSectionGeometry_SectionStartZeroAndSectionEndExactlyOnConsecutiveReferenceLinePoints_ReturnExpectedPoints() - { - // Setup - const int sectionStart = 0; - const int sectionEnd = 10; - var points = new[] - { - new Point2D(sectionStart, 0), - new Point2D(sectionEnd, 0) - }; - - var referenceLine = new ReferenceLine(); - referenceLine.SetGeometry(points); - - // Call - IEnumerable sectionPoints = ExportableFailureMechanismSectionHelper.GetFailureMechanismSectionGeometry(referenceLine, sectionStart, sectionEnd); - - // Assert - CollectionAssert.AreEqual(points, sectionPoints); - } - - [Test] - public void GetFailureMechanismSectionGeometry_SectionStartAndEndExactlyOnReferenceLinePoints_ReturnExpectedPoints() - { - // Setup - const int sectionStart = 10; - const int sectionEnd = 30; - var points = new[] - { - new Point2D(0, 0), - new Point2D(sectionStart, 0), - new Point2D(20, 0), - new Point2D(sectionEnd, 0) - }; - - var referenceLine = new ReferenceLine(); - referenceLine.SetGeometry(points); - - // Call - IEnumerable sectionPoints = ExportableFailureMechanismSectionHelper.GetFailureMechanismSectionGeometry(referenceLine, sectionStart, sectionEnd); - - // Assert - CollectionAssert.AreEqual(new[] - { - new Point2D(sectionStart, 0), - new Point2D(20, 0), - new Point2D(sectionEnd, 0) - }, sectionPoints); - } - - [Test] - public void GetFailureMechanismSectionGeometry_SectionStartAndEndBetweenSameTwoReferenceLinePoints_ReturnExpectedPoints() - { - // Setup - const int sectionStart = 2; - const int sectionEnd = 4; - var referenceLine = new ReferenceLine(); - referenceLine.SetGeometry(new[] - { - new Point2D(0, 0), - new Point2D(5, 0), - new Point2D(15, 0) - }); - - // Call - IEnumerable sectionPoints = ExportableFailureMechanismSectionHelper.GetFailureMechanismSectionGeometry(referenceLine, sectionStart, sectionEnd); - - // Assert - CollectionAssert.AreEqual(new[] - { - new Point2D(sectionStart, 0), - new Point2D(sectionEnd, 0) - }, sectionPoints); - } - - [Test] - public void GetFailureMechanismSectionGeometry_SectionStartAndEndBetweenDifferentTwoReferenceLinePoints_ReturnExpectedPoints() - { - // Setup - var random = new Random(21); - int sectionStart = random.Next(5, 15); - int sectionEnd = random.Next(25, 35); - var referenceLine = new ReferenceLine(); - referenceLine.SetGeometry(new[] - { - new Point2D(0, 0), - new Point2D(5, 0), - new Point2D(15, 0), - new Point2D(25, 0), - new Point2D(35, 0) - }); - - // Call - IEnumerable sectionPoints = ExportableFailureMechanismSectionHelper.GetFailureMechanismSectionGeometry(referenceLine, sectionStart, sectionEnd); - - // Assert - CollectionAssert.AreEqual(new[] - { - new Point2D(sectionStart, 0), - new Point2D(15, 0), - new Point2D(25, 0), - new Point2D(sectionEnd, 0) - }, sectionPoints); - } } } \ No newline at end of file