Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicBoundaryLocationCalculation.cs =================================================================== diff -u -rd2d2142de47452c1faa571a5de3157d6f3205812 -rcd48021e80f6584ce1e29c8ab85365fb055a3a1e --- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicBoundaryLocationCalculation.cs (.../HydraulicBoundaryLocationCalculation.cs) (revision d2d2142de47452c1faa571a5de3157d6f3205812) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicBoundaryLocationCalculation.cs (.../HydraulicBoundaryLocationCalculation.cs) (revision cd48021e80f6584ce1e29c8ab85365fb055a3a1e) @@ -59,11 +59,14 @@ /// Gets a value indicating whether the calculation has already been calculated. /// /// true if the calculation is fully calculated, false otherwise. - /// A calculation is fully calculated, depending on if the illustration points + /// A calculation is fully calculated, depending on whether the illustration points /// are set to be calculated. - public bool IsCalculated() + public bool IsCalculated { - return HasOutput && InputParameters.ShouldIllustrationPointsBeCalculated == Output.HasGeneralResult; + get + { + return HasOutput && InputParameters.ShouldIllustrationPointsBeCalculated == Output.HasGeneralResult; + } } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs =================================================================== diff -u -rd2d2142de47452c1faa571a5de3157d6f3205812 -rcd48021e80f6584ce1e29c8ab85365fb055a3a1e --- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision d2d2142de47452c1faa571a5de3157d6f3205812) +++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision cd48021e80f6584ce1e29c8ab85365fb055a3a1e) @@ -88,7 +88,7 @@ protected override bool Validate() { - if (hydraulicBoundaryLocationCalculation.IsCalculated()) + if (hydraulicBoundaryLocationCalculation.IsCalculated) { State = ActivityState.Skipped; return true; Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationActivity.cs =================================================================== diff -u -r1d54902642a3e1bf3b173afa85cebfa52afb0c15 -rcd48021e80f6584ce1e29c8ab85365fb055a3a1e --- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationActivity.cs (.../WaveHeightCalculationActivity.cs) (revision 1d54902642a3e1bf3b173afa85cebfa52afb0c15) +++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationActivity.cs (.../WaveHeightCalculationActivity.cs) (revision cd48021e80f6584ce1e29c8ab85365fb055a3a1e) @@ -88,7 +88,7 @@ protected override bool Validate() { - if (hydraulicBoundaryLocationCalculation.IsCalculated()) + if (hydraulicBoundaryLocationCalculation.IsCalculated) { State = ActivityState.Skipped; return true; Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationCalculationTest.cs =================================================================== diff -u -rd2d2142de47452c1faa571a5de3157d6f3205812 -rcd48021e80f6584ce1e29c8ab85365fb055a3a1e --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationCalculationTest.cs (.../HydraulicBoundaryLocationCalculationTest.cs) (revision d2d2142de47452c1faa571a5de3157d6f3205812) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationCalculationTest.cs (.../HydraulicBoundaryLocationCalculationTest.cs) (revision cd48021e80f6584ce1e29c8ab85365fb055a3a1e) @@ -23,6 +23,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Data.TestUtil.IllustrationPoints; namespace Ringtoets.Common.Data.Test.Hydraulics { @@ -61,11 +62,11 @@ [Test] [TestCaseSource(nameof(GetHydraulicBoundaryLocationCalculations))] - public void IsCalculated_NotFullyCalculated_ReturnIsCalculated(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation, - bool expectedIsCalculated) + public void IsCalculated_Always_ReturnIsCalculated(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation, + bool expectedIsCalculated) { // Call - bool isCalculated = hydraulicBoundaryLocationCalculation.IsCalculated(); + bool isCalculated = hydraulicBoundaryLocationCalculation.IsCalculated; // Assert Assert.AreEqual(expectedIsCalculated, isCalculated); @@ -88,6 +89,20 @@ { Output = new TestHydraulicBoundaryLocationOutput(1.0, CalculationConvergence.CalculatedConverged) }, true); + + yield return new TestCaseData(new HydraulicBoundaryLocationCalculation + { + InputParameters = + { + ShouldIllustrationPointsBeCalculated = true + }, + Output = new TestHydraulicBoundaryLocationOutput(1.0, new TestGeneralResultSubMechanismIllustrationPoint()) + }, true); + + yield return new TestCaseData(new HydraulicBoundaryLocationCalculation + { + Output = new TestHydraulicBoundaryLocationOutput(1.0, new TestGeneralResultSubMechanismIllustrationPoint()) + }, false); } } } \ No newline at end of file