Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StructuresCalculationCreateExtensions.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StructuresCalculationCreateExtensions.cs (.../StructuresCalculationCreateExtensions.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StructuresCalculationCreateExtensions.cs (.../StructuresCalculationCreateExtensions.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -100,12 +100,12 @@ ProbabilityAssessmentOutput probabilityAssessmentOutput = calculationOutput.ProbabilityAssessmentOutput; var outputEntity = probabilityAssessmentOutput.Create(); - SetIllustrationPoints(outputEntity, calculationOutput); + SetGeneralResult(outputEntity, calculationOutput); outputEntities.Add(outputEntity); } - private static void SetIllustrationPoints(IHasGeneralResultFaultTreeIllustrationPointEntity outputEntity, + private static void SetGeneralResult(IHasGeneralResultFaultTreeIllustrationPointEntity outputEntity, StructuresOutput calculationOutput) { if (calculationOutput.HasGeneralResult) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs (.../ClosingStructuresCalculationEntityReadExtensionsTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs (.../ClosingStructuresCalculationEntityReadExtensionsTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -315,7 +315,7 @@ } [Test] - public void Read_ValidEntityWithOutputAndIllustrationPoints_ReturnCalculationWithOutputAndGeneralResult() + public void Read_ValidEntityWithOutputAndGeneralResult_ReturnCalculationWithOutputAndGeneralResult() { // Setup var random = new Random(678); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensionsTest.cs (.../HeightStructuresCalculationEntityReadExtensionsTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensionsTest.cs (.../HeightStructuresCalculationEntityReadExtensionsTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -206,7 +206,7 @@ } [Test] - public void Read_ValidEntityWithOutputAndIllustrationPoints_ReturnCalculationWithOutputAndGeneralResult() + public void Read_ValidEntityWithOutputAndGeneralResult_ReturnCalculationWithOutputAndGeneralResult() { // Setup var random = new Random(678); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs (.../StabilityPointStructuresCalculationEntityReadExtensionsTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs (.../StabilityPointStructuresCalculationEntityReadExtensionsTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -399,7 +399,7 @@ } [Test] - public void Read_ValidEntityWithOutputAndIllustrationPoints_ReturnCalculationWithOutputAndGeneralResult() + public void Read_ValidEntityWithOutputAndGeneralResult_ReturnCalculationWithOutputAndGeneralResult() { // Setup var random = new Random(678); Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -193,7 +193,7 @@ if (designWaterLevelCalculation.CalculateIllustrationPoints) { - SetIllustrationPointsResult(hydraulicBoundaryLocationOutput, calculator.IllustrationPointsResult); + SetGeneralResult(hydraulicBoundaryLocationOutput, calculator.IllustrationPointsResult); } designWaterLevelCalculation.Output = hydraulicBoundaryLocationOutput; @@ -207,7 +207,7 @@ /// for which to set the . /// The to base the /// to create on. - private void SetIllustrationPointsResult(HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput, + private void SetGeneralResult(HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput, HydraRingGeneralResult hydraRingGeneralResult) { if (hydraRingGeneralResult == null) @@ -224,7 +224,7 @@ } catch (IllustrationPointConversionException e) { - log.Warn(Resources.SetIllustrationPointsResult_Converting_IllustrationPointResult_Failed, e); + log.Warn(Resources.SetGeneralResult_Converting_IllustrationPointResult_Failed, e); } } Index: Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.Designer.cs =================================================================== diff -u -r42589a013431937bdf0165af5fda1228d235629a -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 42589a013431937bdf0165af5fda1228d235629a) +++ Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -294,9 +294,9 @@ /// /// Looks up a localized string similar to Het uitlezen van illustratiepunten is mislukt.. /// - public static string SetIllustrationPointsResult_Converting_IllustrationPointResult_Failed { + public static string SetGeneralResult_Converting_IllustrationPointResult_Failed { get { - return ResourceManager.GetString("SetIllustrationPointsResult_Converting_IllustrationPointResult_Failed", resourceCulture); + return ResourceManager.GetString("SetGeneralResult_Converting_IllustrationPointResult_Failed", resourceCulture); } } Index: Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.resx =================================================================== diff -u -r42589a013431937bdf0165af5fda1228d235629a -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.resx (.../Resources.resx) (revision 42589a013431937bdf0165af5fda1228d235629a) +++ Ringtoets/Common/src/Ringtoets.Common.Service/Properties/Resources.resx (.../Resources.resx) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -206,7 +206,7 @@ Golfcondities berekenen voor '{0}' - + Het uitlezen van illustratiepunten is mislukt. Index: Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs (.../StructuresCalculationServiceBase.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs (.../StructuresCalculationServiceBase.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -278,7 +278,7 @@ if (calculation.InputParameters.ShouldIllustrationPointsBeCalculated) { - SetIllustrationPointsResult(calculation.Output, calculator.IllustrationPointsResult); + SetGeneralResult(calculation.Output, calculator.IllustrationPointsResult); } } @@ -290,7 +290,7 @@ /// for which to set the . /// The to base the /// to create on. - private void SetIllustrationPointsResult(StructuresOutput structuresOutput, + private void SetGeneralResult(StructuresOutput structuresOutput, HydraRingGeneralResult hydraRingGeneralResult) { if (hydraRingGeneralResult == null) @@ -307,7 +307,7 @@ } catch (IllustrationPointConversionException e) { - log.Warn(Resources.SetIllustrationPointsResult_Converting_IllustrationPointResult_Failed, e); + log.Warn(Resources.SetGeneralResult_Converting_IllustrationPointResult_Failed, e); } } Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -194,7 +194,7 @@ if (waveHeightCalculation.CalculateIllustrationPoints) { - SetIllustrationPointsResult(hydraulicBoundaryLocationOutput, calculator.IllustrationPointsResult); + SetGeneralResult(hydraulicBoundaryLocationOutput, calculator.IllustrationPointsResult); } waveHeightCalculation.Output = hydraulicBoundaryLocationOutput; @@ -208,7 +208,7 @@ /// for which to set the . /// The to base the /// to create on. - private void SetIllustrationPointsResult(HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput, + private void SetGeneralResult(HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput, HydraRingGeneralResult hydraRingGeneralResult) { if (hydraRingGeneralResult == null) @@ -225,7 +225,7 @@ } catch (IllustrationPointConversionException e) { - log.Warn(Resources.SetIllustrationPointsResult_Converting_IllustrationPointResult_Failed, e); + log.Warn(Resources.SetGeneralResult_Converting_IllustrationPointResult_Failed, e); } } Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs (.../HydraulicBoundaryLocationOutputTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs (.../HydraulicBoundaryLocationOutputTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -109,7 +109,7 @@ } [Test] - public void SetIllustrationPoints_GeneralResultNull_ThrowsArgumentNullException() + public void SetGeneralResult_GeneralResultNull_ThrowsArgumentNullException() { // Setup var random = new Random(32); @@ -125,7 +125,7 @@ } [Test] - public void SetIllustrationPoints_ValidGeneralResult_SetsExpectedProperties() + public void SetGeneralResult_ValidGeneralResult_SetsExpectedProperties() { // Setup var random = new Random(32); Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresOutputTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresOutputTest.cs (.../StructuresOutputTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresOutputTest.cs (.../StructuresOutputTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -57,7 +57,7 @@ } [Test] - public void SetIllustrationPoints_GeneralResultNull_ThrowsArgumentNullException() + public void SetGeneralResult_GeneralResultNull_ThrowsArgumentNullException() { // Setup var structuresOutput = new StructuresOutput(new TestProbabilityAssessmentOutput()); @@ -71,7 +71,7 @@ } [Test] - public void SetIllustrationPoints_ValidGeneralResult_SetExpectedProperties() + public void SetGeneralResult_ValidGeneralResult_SetExpectedProperties() { // Setup var generalResult = new TestGeneralResultFaultTreeIllustrationPoint(); Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsOvertoppingOutput.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsOvertoppingOutput.cs (.../GrassCoverErosionInwardsOvertoppingOutput.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsOvertoppingOutput.cs (.../GrassCoverErosionInwardsOvertoppingOutput.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -75,7 +75,7 @@ } /// - /// Gets the value indicating whether the output contains illustration points. + /// Gets the value indicating whether the output contains a general result with illustration points. /// public bool HasGeneralResult { Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/HydraulicLoadsOutput.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/HydraulicLoadsOutput.cs (.../HydraulicLoadsOutput.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/HydraulicLoadsOutput.cs (.../HydraulicLoadsOutput.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -87,7 +87,7 @@ public CalculationConvergence CalculationConvergence { get; } /// - /// Gets the value indicating whether the output contains illustration points. + /// Gets the value indicating whether the output contains a general result with illustration points. /// public bool HasGeneralResult { Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs =================================================================== diff -u -rc72b7ff765e65c4c17bfa01fcb940ef61ba9f86f -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision c72b7ff765e65c4c17bfa01fcb940ef61ba9f86f) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -21,8 +21,10 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.IO; using System.Linq; +using System.Security; using Core.Common.Base.IO; using Core.Common.Utils; using log4net; @@ -39,9 +41,9 @@ using Ringtoets.GrassCoverErosionInwards.Service.Properties; using Ringtoets.HydraRing.Calculation.Calculator; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics; using Ringtoets.HydraRing.Calculation.Data.Input.Overtopping; -using Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints; using Ringtoets.HydraRing.Calculation.Exceptions; using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources; using RingtoetsCommonForms = Ringtoets.Common.Forms.Properties.Resources; @@ -221,17 +223,20 @@ } } - private static void SetGeneralResult(Action> action, HydraRingGeneralResult generalResult, string parserError, bool shouldCalculate) + private static void SetGeneralResult(Action> setGeneralResultAction, + HydraRingGeneralResult generalResult, + string parserError, + bool shouldCalculate) { - if (action == null || !shouldCalculate) + if (!shouldCalculate) { return; } GeneralResult converted = ConvertIllustrationPointsResult(generalResult, parserError); if (converted != null) { - action(converted); + setGeneralResultAction(converted); } } @@ -330,9 +335,9 @@ } DikeHeightOutput output = CreateDikeHeightOutput(dikeHeightCalculator, - calculation.Name, - dikeHeightCalculationInput.Beta, - norm); + calculation.Name, + dikeHeightCalculationInput.Beta, + norm); SetGeneralResult(output.SetGeneralResult, dikeHeightCalculator.IllustrationPointsResult, dikeHeightCalculator.IllustrationPointsParserErrorMessage, @@ -388,9 +393,9 @@ } OvertoppingRateOutput output = CreateOvertoppingRateOutput(overtoppingRateCalculator, - calculation.Name, - overtoppingRateCalculationInput.Beta, - norm); + calculation.Name, + overtoppingRateCalculationInput.Beta, + norm); SetGeneralResult(output.SetGeneralResult, overtoppingRateCalculator.IllustrationPointsResult, overtoppingRateCalculator.IllustrationPointsParserErrorMessage, @@ -401,7 +406,7 @@ /// /// Performs a grass cover erosion inwards calculation. /// - /// The action that performs the calculation. + /// The setGeneralResultAction that performs the calculation. /// The function for obtaining the last error file content. /// The function for obtaining the output directory. /// The name of the calculation to perform. @@ -736,10 +741,10 @@ } /// - /// Converts a based on the information + /// Converts a based on the information /// of to a . /// - /// The to base the + /// The to base the /// to create on. /// Error message to display when the general result is null private static GeneralResult ConvertIllustrationPointsResult(HydraRingGeneralResult result, string errorMessage) @@ -761,7 +766,7 @@ } catch (IllustrationPointConversionException e) { - log.Warn(RingtoetsCommonServiceResources.SetIllustrationPointsResult_Converting_IllustrationPointResult_Failed, e); + log.Warn(RingtoetsCommonServiceResources.SetGeneralResult_Converting_IllustrationPointResult_Failed, e); } return null; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsOvertoppingOutputTest.cs =================================================================== diff -u -rc72b7ff765e65c4c17bfa01fcb940ef61ba9f86f -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsOvertoppingOutputTest.cs (.../GrassCoverErosionInwardsOvertoppingOutputTest.cs) (revision c72b7ff765e65c4c17bfa01fcb940ef61ba9f86f) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsOvertoppingOutputTest.cs (.../GrassCoverErosionInwardsOvertoppingOutputTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -21,7 +21,6 @@ using System; using NUnit.Framework; -using Ringtoets.Common.Data.IllustrationPoints; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Data.TestUtil.IllustrationPoints; @@ -69,10 +68,8 @@ // Setup const double waveHeight = 3.2934; - ProbabilityAssessmentOutput probabilityAssessmentOutput = null; - // Call - TestDelegate call = () => new GrassCoverErosionInwardsOvertoppingOutput(waveHeight, true, probabilityAssessmentOutput); + TestDelegate call = () => new GrassCoverErosionInwardsOvertoppingOutput(waveHeight, true, null); // Assert var exception = Assert.Throws(call); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/HydraulicLoadsOutputTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/HydraulicLoadsOutputTest.cs (.../HydraulicLoadsOutputTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/HydraulicLoadsOutputTest.cs (.../HydraulicLoadsOutputTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -116,16 +116,12 @@ { // Setup var random = new Random(32); - double targetProbability = random.NextDouble(); - double targetReliability = random.NextDouble(); - double calculatedProbability = random.NextDouble(); - double calculatedReliability = random.NextDouble(); var convergence = random.NextEnumValue(); - var output = new TestHydraulicLoadsOutput(targetProbability, - targetReliability, - calculatedProbability, - calculatedReliability, - convergence); + var output = new TestHydraulicLoadsOutput(double.NaN, + double.NaN, + double.NaN, + double.NaN, + convergence); // Call TestDelegate call = () => output.SetGeneralResult(null); @@ -156,6 +152,7 @@ // Assert Assert.AreSame(generalResult, output.GeneralResult); + Assert.IsTrue(output.HasGeneralResult); } private class TestHydraulicLoadsOutput : HydraulicLoadsOutput Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -296,35 +296,24 @@ const int numberOfChangedProperties = 3; var failureMechanism = mockRepository.Stub(); var calculation = mockRepository.Stub(); - var observerMock = mockRepository.StrictMock(); - observerMock.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); - mockRepository.ReplayAll(); - var input = new GrassCoverErosionInwardsInput - { - DikeProfile = new TestDikeProfile(new Point2D(12.34, 56.78)), - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "", 0, 0) - }; + var input = new GrassCoverErosionInwardsInput(); var inputContext = new GrassCoverErosionInwardsInputContext(input, calculation, failureMechanism, assessmentSection); - - // Call var properties = new GrassCoverErosionInwardsInputContextProperties(inputContext, handler); inputContext.Attach(observerMock); - - // Call properties.ShouldDikeHeightIllustrationPointsBeCalculated = true; properties.ShouldOvertoppingOutputIllustrationPointsBeCalculated = true; properties.ShouldOvertoppingRateIllustrationPointsBeCalculated = true; // Assert - Assert.AreEqual(true, properties.ShouldDikeHeightIllustrationPointsBeCalculated); - Assert.AreEqual(true, properties.ShouldOvertoppingOutputIllustrationPointsBeCalculated); - Assert.AreEqual(true, properties.ShouldOvertoppingRateIllustrationPointsBeCalculated); + Assert.IsTrue(properties.ShouldDikeHeightIllustrationPointsBeCalculated); + Assert.IsTrue(properties.ShouldOvertoppingOutputIllustrationPointsBeCalculated); + Assert.IsTrue(properties.ShouldOvertoppingRateIllustrationPointsBeCalculated); mockRepository.VerifyAll(); } @@ -633,6 +622,12 @@ public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool withDikeProfile) { // Setup + const string schematizationCategoryName = "Schematisatie"; + const string criticalValuesCategoryName = "Toetseisen"; + const string hydraulicDataCategoryName = "Hydraulische gegevens"; + const string dikeHeightCategoryName = "HBN"; + const string overtoppingRateCategoryName = "Overslagdebiet"; + const string overtoppingOutputCategoryName = "Sterkte berekening"; mockRepository.ReplayAll(); var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); @@ -654,91 +649,91 @@ PropertyDescriptor dikeProfileProperty = dynamicProperties[dikeProfilePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeProfileProperty, - "Schematisatie", + schematizationCategoryName, "Dijkprofiel", "De schematisatie van het dijkprofiel."); PropertyDescriptor worldReferencePointProperty = dynamicProperties[worldReferencePointPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(worldReferencePointProperty, - "Schematisatie", + schematizationCategoryName, "Locatie (RD) [m]", "De coördinaten van de locatie van de dijk in het Rijksdriehoeksstelsel.", true); PropertyDescriptor orientationProperty = dynamicProperties[orientationPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(orientationProperty, - "Schematisatie", + schematizationCategoryName, "Oriëntatie [°]", "Oriëntatie van de dijknormaal ten opzichte van het noorden.", !withDikeProfile); PropertyDescriptor breakWaterProperty = dynamicProperties[breakWaterPropertyIndex]; Assert.IsInstanceOf(breakWaterProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(breakWaterProperty, - "Schematisatie", + schematizationCategoryName, "Dam", "Eigenschappen van de dam.", true); PropertyDescriptor foreshoreProperty = dynamicProperties[foreshorePropertyIndex]; Assert.IsInstanceOf(foreshoreProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(foreshoreProperty, - "Schematisatie", + schematizationCategoryName, "Voorlandgeometrie", "Eigenschappen van de voorlandgeometrie.", true); PropertyDescriptor dikeGeometryProperty = dynamicProperties[dikeGeometryPropertyIndex]; Assert.IsInstanceOf(dikeGeometryProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeGeometryProperty, - "Schematisatie", + schematizationCategoryName, "Dijkgeometrie", "Eigenschappen van de dijkgeometrie.", true); PropertyDescriptor dikeHeightProperty = dynamicProperties[dikeHeightPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeHeightProperty, - "Schematisatie", + schematizationCategoryName, "Dijkhoogte [m+NAP]", "De hoogte van de dijk.", !withDikeProfile); PropertyDescriptor criticalFlowRateProperty = dynamicProperties[criticalFlowRatePropertyIndex]; Assert.IsInstanceOf(criticalFlowRateProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(criticalFlowRateProperty, - "Toetseisen", + criticalValuesCategoryName, "Kritiek overslagdebiet [m³/s/m]", "Kritiek overslagdebiet per strekkende meter.", true); PropertyDescriptor hydraulicBoundaryLocationProperty = dynamicProperties[hydraulicBoundaryLocationPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(hydraulicBoundaryLocationProperty, - "Hydraulische gegevens", + hydraulicDataCategoryName, "Locatie met hydraulische randvoorwaarden", "De locatie met hydraulische randvoorwaarden."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[calculateDikeHeightPropertyIndex], - "HBN", + dikeHeightCategoryName, "HBN berekenen", "Geeft aan of ook het Hydraulisch Belasting Niveau (HBN) moet worden berekend."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[calculateOvertoppingRatePropertyIndex], - "Overslagdebiet", + overtoppingRateCategoryName, "Overslagdebiet berekenen", "Geeft aan of ook het overslagdebiet moet worden berekend."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[dikeHeightOutputIllustrationPointsPropertyIndex], - "HBN", + dikeHeightCategoryName, "Illustratiepunten inlezen", "Neem de informatie over de illustratiepunten op in het berekeningsresultaat."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[overtoppingOutputIllustrationPointsPropertyIndex], - "Overslagdebiet", + overtoppingRateCategoryName, "Illustratiepunten inlezen", "Neem de informatie over de illustratiepunten op in het berekeningsresultaat."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[overtoppingRateIllustrationPointsPropertyIndex], - "Sterkte berekening", + overtoppingOutputCategoryName, "Illustratiepunten inlezen", "Neem de informatie over de illustratiepunten op in het berekeningsresultaat."); mockRepository.VerifyAll();