Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs =================================================================== diff -u -r505e67e711e2eaa9486af6c828a41afbd1214046 -ra6e620bbe142b553dbde05a7b450050be599de02 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision 505e67e711e2eaa9486af6c828a41afbd1214046) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision a6e620bbe142b553dbde05a7b450050be599de02) @@ -171,7 +171,7 @@ set { surfaceLine = value; - SynchronizeEntryAndExitPoint(); + SynchronizeEntryAndExitPointInput(); } } @@ -211,29 +211,35 @@ } /// - /// Gets whether the entry and exit point are synchronized with the set . + /// Gets the value true if the entry point and exit point of the + /// instance of match the entry point and + /// exit point of ; or false if this is + /// not the case, or if there is no assigned. /// - /// Always returns false in case no surface line is present. - public bool EntryAndExitPointSynchronized() + public bool IsEntryAndExitPointInputSynchronized { - if (SurfaceLine == null) + get { - return false; - } + if (SurfaceLine == null) + { + return false; + } - double newEntryPointL; - double newExitPointL; - GetEntryExitPointFromSurfaceLine(out newEntryPointL, out newExitPointL); + double newEntryPointL; + double newExitPointL; + GetEntryExitPointFromSurfaceLine(out newEntryPointL, out newExitPointL); - return Math.Abs(newEntryPointL - EntryPointL) < 1e-6 - && Math.Abs(newExitPointL - ExitPointL) < 1e-6; + return Math.Abs(newEntryPointL - EntryPointL) < 1e-6 + && Math.Abs(newExitPointL - ExitPointL) < 1e-6; + } } /// - /// Synchronizes the entry and exit point with the parameters of the surface line. + /// Applies the entry point and exit point of the to the + /// parameters of the instance of . /// /// When no surface line is present, the entry and exit point are set to . - public void SynchronizeEntryAndExitPoint() + public void SynchronizeEntryAndExitPointInput() { if (SurfaceLine == null) { Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs =================================================================== diff -u -r505e67e711e2eaa9486af6c828a41afbd1214046 -ra6e620bbe142b553dbde05a7b450050be599de02 --- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 505e67e711e2eaa9486af6c828a41afbd1214046) +++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision a6e620bbe142b553dbde05a7b450050be599de02) @@ -823,9 +823,9 @@ private static void UpdateSurfaceLineDependentData(PipingCalculation scenario) { - if (!scenario.InputParameters.EntryAndExitPointSynchronized()) + if (!scenario.InputParameters.IsEntryAndExitPointInputSynchronized) { - scenario.InputParameters.SynchronizeEntryAndExitPoint(); + scenario.InputParameters.SynchronizeEntryAndExitPointInput(); var affectedObjects = new List { Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs =================================================================== diff -u -r505e67e711e2eaa9486af6c828a41afbd1214046 -ra6e620bbe142b553dbde05a7b450050be599de02 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 505e67e711e2eaa9486af6c828a41afbd1214046) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision a6e620bbe142b553dbde05a7b450050be599de02) @@ -401,7 +401,7 @@ } [Test] - public void SynchronizeEntryAndExitPoint_SurfaceLineNull_EntryPointLAndExitPointLNaN() + public void SynchronizeEntryAndExitPointInput_SurfaceLineNull_EntryPointLAndExitPointLNaN() { // Setup var input = new PipingInput(new GeneralPipingInput()) @@ -415,15 +415,15 @@ Assert.AreEqual(5, input.ExitPointL.Value); // Call - input.SynchronizeEntryAndExitPoint(); + input.SynchronizeEntryAndExitPointInput(); // Assert Assert.IsNaN(input.EntryPointL); Assert.IsNaN(input.ExitPointL); } [Test] - public void SynchronizeEntryAndExitPoint_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() + public void SynchronizeEntryAndExitPointInput_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() { // Setup var input = new PipingInput(new GeneralPipingInput()); @@ -446,15 +446,15 @@ input.ExitPointL = (RoundedDouble) 1; // Call - input.SynchronizeEntryAndExitPoint(); + input.SynchronizeEntryAndExitPointInput(); // 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 SynchronizeEntryAndExitPointInput_DikeToesBeforeSetEntryPointL_ExitPointLAndEntryPointLUpdated() { // Setup var input = new PipingInput(new GeneralPipingInput()); @@ -477,28 +477,28 @@ input.EntryPointL = (RoundedDouble) 4; // Call - input.SynchronizeEntryAndExitPoint(); + input.SynchronizeEntryAndExitPointInput(); // 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 IsEntryAndExitPointInputSynchronized_SurfaceLineNull_ReturnFalse() { // Setup var input = new PipingInput(new GeneralPipingInput()); // Call - bool synchronized = input.EntryAndExitPointSynchronized(); + bool synchronized = input.IsEntryAndExitPointInputSynchronized; // Assert Assert.IsFalse(synchronized); } [Test] - public void EntryAndExitPointSynchronized_SurfaceLineAndInputInSync_ReturnTrue() + public void IsEntryAndExitPointInputSynchronized_SurfaceLineAndInputInSync_ReturnTrue() { // Setup var surfaceLine = new RingtoetsPipingSurfaceLine(); @@ -520,15 +520,15 @@ }; // Call - bool synchronized = input.EntryAndExitPointSynchronized(); + bool synchronized = input.IsEntryAndExitPointInputSynchronized; // Assert Assert.IsTrue(synchronized); } [Test] [TestCaseSource(nameof(DifferentSurfaceLineProperties))] - public void EntryAndExitPointSynchronized_SurfaceLineAndInputNotInSync_ReturnFalse(Point3D newDikeToeAtRiver, Point3D newDikeToeAtPolder) + public void IsEntryAndExitPointInputSynchronized_SurfaceLineAndInputNotInSync_ReturnFalse(Point3D newDikeToeAtRiver, Point3D newDikeToeAtPolder) { // Setup var surfaceLine = new RingtoetsPipingSurfaceLine(); @@ -553,7 +553,7 @@ input.SurfaceLine.SetDikeToeAtPolderAt(newDikeToeAtPolder); // Call - bool synchronized = input.EntryAndExitPointSynchronized(); + bool synchronized = input.IsEntryAndExitPointInputSynchronized; // Assert Assert.IsFalse(synchronized);