Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs =================================================================== diff -u -r3c0603a8b7245c3daafb7ac23911138db9794449 -rb33f26b930ba074c8ab10eb59fca2cba84f9bdca --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 3c0603a8b7245c3daafb7ac23911138db9794449) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision b33f26b930ba074c8ab10eb59fca2cba84f9bdca) @@ -40,6 +40,17 @@ [TestFixture] public class PipingInputTest { + private static IEnumerable DifferentSurfaceLineProperties + { + get + { + yield return new TestCaseData(new Point3D(3, 0, 0), new Point3D(3, 0, 0)) + .SetName("DifferentDikeToeAtRiver"); + yield return new TestCaseData(new Point3D(2, 0, 3), new Point3D(4, 0, 2)) + .SetName("DifferentDikeToeAtPolder"); + } + } + [Test] public void Constructor_ExpectedValues() { @@ -401,7 +412,7 @@ } [Test] - public void SynchronizeEntryAndExitPoint_SurfaceLineNull_EntryPointLAndExitPointLNaN() + public void SynchronizeSurfaceLineInput_SurfaceLineNull_EntryPointLAndExitPointLNaN() { // Setup var input = new PipingInput(new GeneralPipingInput()) @@ -415,15 +426,15 @@ Assert.AreEqual(5, input.ExitPointL.Value); // Call - input.SynchronizeEntryAndExitPoint(); + input.SynchronizeSurfaceLineInput(); // Assert Assert.IsNaN(input.EntryPointL); Assert.IsNaN(input.ExitPointL); } [Test] - public void SynchronizeEntryAndExitPoint_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() + public void SynchronizeSurfaceLineInput_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() { // Setup var input = new PipingInput(new GeneralPipingInput()); @@ -446,15 +457,15 @@ input.ExitPointL = (RoundedDouble) 1; // Call - input.SynchronizeEntryAndExitPoint(); + input.SynchronizeSurfaceLineInput(); // Assert Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); Assert.AreEqual(new RoundedDouble(3, 3), input.ExitPointL); } [Test] - public void SynchronizeEntryAndExitPoint_DikeToesBeforeSetEntryPointL_ExitPointLAndEntryPointLUpdated() + public void SynchronizeSurfaceLineInput_DikeToesBeforeSetEntryPointL_ExitPointLAndEntryPointLUpdated() { // Setup var input = new PipingInput(new GeneralPipingInput()); @@ -477,28 +488,28 @@ input.EntryPointL = (RoundedDouble) 4; // Call - input.SynchronizeEntryAndExitPoint(); + input.SynchronizeSurfaceLineInput(); // Assert Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); Assert.AreEqual(new RoundedDouble(2, 3), input.ExitPointL); } [Test] - public void EntryAndExitPointSynchronized_SurfaceLineNull_ReturnFalse() + public void IsSurfaceLineInputSynchronized_SurfaceLineNull_ReturnFalse() { // Setup var input = new PipingInput(new GeneralPipingInput()); // Call - bool synchronized = input.EntryAndExitPointSynchronized(); + bool synchronized = input.IsSurfaceLineInputSynchronized; // Assert Assert.IsFalse(synchronized); } [Test] - public void EntryAndExitPointSynchronized_SurfaceLineAndInputInSync_ReturnTrue() + public void IsSurfaceLineInputSynchronized_SurfaceLineAndInputInSync_ReturnTrue() { // Setup var surfaceLine = new RingtoetsPipingSurfaceLine(); @@ -520,15 +531,15 @@ }; // Call - bool synchronized = input.EntryAndExitPointSynchronized(); + bool synchronized = input.IsSurfaceLineInputSynchronized; // Assert Assert.IsTrue(synchronized); } [Test] [TestCaseSource(nameof(DifferentSurfaceLineProperties))] - public void EntryAndExitPointSynchronized_SurfaceLineAndInputNotInSync_ReturnFalse(Point3D newDikeToeAtRiver, Point3D newDikeToeAtPolder) + public void IsSurfaceLineInputSynchronized_SurfaceLineAndInputNotInSync_ReturnFalse(Point3D newDikeToeAtRiver, Point3D newDikeToeAtPolder) { // Setup var surfaceLine = new RingtoetsPipingSurfaceLine(); @@ -553,23 +564,12 @@ input.SurfaceLine.SetDikeToeAtPolderAt(newDikeToeAtPolder); // Call - bool synchronized = input.EntryAndExitPointSynchronized(); + bool synchronized = input.IsSurfaceLineInputSynchronized; // Assert Assert.IsFalse(synchronized); } - private static IEnumerable DifferentSurfaceLineProperties - { - get - { - yield return new TestCaseData(new Point3D(3, 0, 0), new Point3D(3, 0, 0)) - .SetName("DifferentDikeToeAtRiver"); - yield return new TestCaseData(new Point3D(2, 0, 3), new Point3D(4, 0, 2)) - .SetName("DifferentDikeToeAtPolder"); ; - } - } - [Test] public void GivenSurfaceLineSet_WhenSurfaceLineNull_ThenEntryAndExitPointsNaN() {