Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs =================================================================== diff -u -rb33f26b930ba074c8ab10eb59fca2cba84f9bdca -r505e67e711e2eaa9486af6c828a41afbd1214046 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision b33f26b930ba074c8ab10eb59fca2cba84f9bdca) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 505e67e711e2eaa9486af6c828a41afbd1214046) @@ -40,17 +40,6 @@ [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() { @@ -412,7 +401,7 @@ } [Test] - public void SynchronizeSurfaceLineInput_SurfaceLineNull_EntryPointLAndExitPointLNaN() + public void SynchronizeEntryAndExitPoint_SurfaceLineNull_EntryPointLAndExitPointLNaN() { // Setup var input = new PipingInput(new GeneralPipingInput()) @@ -426,15 +415,15 @@ Assert.AreEqual(5, input.ExitPointL.Value); // Call - input.SynchronizeSurfaceLineInput(); + input.SynchronizeEntryAndExitPoint(); // Assert Assert.IsNaN(input.EntryPointL); Assert.IsNaN(input.ExitPointL); } [Test] - public void SynchronizeSurfaceLineInput_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() + public void SynchronizeEntryAndExitPoint_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() { // Setup var input = new PipingInput(new GeneralPipingInput()); @@ -457,15 +446,15 @@ input.ExitPointL = (RoundedDouble) 1; // Call - input.SynchronizeSurfaceLineInput(); + input.SynchronizeEntryAndExitPoint(); // Assert Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); Assert.AreEqual(new RoundedDouble(3, 3), input.ExitPointL); } [Test] - public void SynchronizeSurfaceLineInput_DikeToesBeforeSetEntryPointL_ExitPointLAndEntryPointLUpdated() + public void SynchronizeEntryAndExitPoint_DikeToesBeforeSetEntryPointL_ExitPointLAndEntryPointLUpdated() { // Setup var input = new PipingInput(new GeneralPipingInput()); @@ -488,28 +477,28 @@ input.EntryPointL = (RoundedDouble) 4; // Call - input.SynchronizeSurfaceLineInput(); + input.SynchronizeEntryAndExitPoint(); // Assert Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); Assert.AreEqual(new RoundedDouble(2, 3), input.ExitPointL); } [Test] - public void IsSurfaceLineInputSynchronized_SurfaceLineNull_ReturnFalse() + public void EntryAndExitPointSynchronized_SurfaceLineNull_ReturnFalse() { // Setup var input = new PipingInput(new GeneralPipingInput()); // Call - bool synchronized = input.IsSurfaceLineInputSynchronized; + bool synchronized = input.EntryAndExitPointSynchronized(); // Assert Assert.IsFalse(synchronized); } [Test] - public void IsSurfaceLineInputSynchronized_SurfaceLineAndInputInSync_ReturnTrue() + public void EntryAndExitPointSynchronized_SurfaceLineAndInputInSync_ReturnTrue() { // Setup var surfaceLine = new RingtoetsPipingSurfaceLine(); @@ -531,15 +520,15 @@ }; // Call - bool synchronized = input.IsSurfaceLineInputSynchronized; + bool synchronized = input.EntryAndExitPointSynchronized(); // Assert Assert.IsTrue(synchronized); } [Test] [TestCaseSource(nameof(DifferentSurfaceLineProperties))] - public void IsSurfaceLineInputSynchronized_SurfaceLineAndInputNotInSync_ReturnFalse(Point3D newDikeToeAtRiver, Point3D newDikeToeAtPolder) + public void EntryAndExitPointSynchronized_SurfaceLineAndInputNotInSync_ReturnFalse(Point3D newDikeToeAtRiver, Point3D newDikeToeAtPolder) { // Setup var surfaceLine = new RingtoetsPipingSurfaceLine(); @@ -564,12 +553,23 @@ input.SurfaceLine.SetDikeToeAtPolderAt(newDikeToeAtPolder); // Call - bool synchronized = input.IsSurfaceLineInputSynchronized; + bool synchronized = input.EntryAndExitPointSynchronized(); // 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() {