Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/DesignWaterLevelLocationProperties.cs =================================================================== diff -u -ra35382acfc248a3914fca73eb718d4797f56535d -r3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/DesignWaterLevelLocationProperties.cs (.../DesignWaterLevelLocationProperties.cs) (revision a35382acfc248a3914fca73eb718d4797f56535d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/DesignWaterLevelLocationProperties.cs (.../DesignWaterLevelLocationProperties.cs) (revision 3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7) @@ -23,6 +23,7 @@ using System.ComponentModel; using Core.Common.Base.Data; using Core.Common.Gui.Attributes; +using Core.Common.Util; using Core.Common.Util.Attributes; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Forms.TypeConverters; @@ -56,5 +57,19 @@ return data.Output?.Result ?? RoundedDouble.NaN; } } + + [PropertyOrder(9)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_Convergence_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Convergence_DesignWaterLevel_Description))] + public string Convergence + { + get + { + CalculationConvergence convergence = data.Output?.CalculationConvergence ?? CalculationConvergence.NotCalculated; + + return new EnumDisplayWrapper(convergence).DisplayName; + } + } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs =================================================================== diff -u -ra35382acfc248a3914fca73eb718d4797f56535d -r3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision a35382acfc248a3914fca73eb718d4797f56535d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision 3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7) @@ -28,13 +28,11 @@ using Core.Common.Gui.Attributes; using Core.Common.Gui.Converters; using Core.Common.Gui.PropertyBag; -using Core.Common.Util; using Core.Common.Util.Attributes; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.IllustrationPoints; using Ringtoets.Common.Forms.PropertyClasses; using Ringtoets.Common.Forms.TypeConverters; -using Ringtoets.Integration.Forms.Properties; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.PropertyClasses @@ -148,20 +146,6 @@ } } - [PropertyOrder(9)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_Convergence_DisplayName))] - [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Convergence_WaveHeight_Description))] - public string Convergence - { - get - { - CalculationConvergence convergence = data.Output?.CalculationConvergence ?? CalculationConvergence.NotCalculated; - - return new EnumDisplayWrapper(convergence).DisplayName; - } - } - [PropertyOrder(10)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_IllustrationPoints))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ShouldIllustrationPointsBeCalculated_DisplayName))] Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/WaveHeightLocationProperties.cs =================================================================== diff -u -ra35382acfc248a3914fca73eb718d4797f56535d -r3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/WaveHeightLocationProperties.cs (.../WaveHeightLocationProperties.cs) (revision a35382acfc248a3914fca73eb718d4797f56535d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/WaveHeightLocationProperties.cs (.../WaveHeightLocationProperties.cs) (revision 3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7) @@ -23,6 +23,7 @@ using System.ComponentModel; using Core.Common.Base.Data; using Core.Common.Gui.Attributes; +using Core.Common.Util; using Core.Common.Util.Attributes; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Forms.TypeConverters; @@ -56,5 +57,19 @@ return data.Output?.Result ?? RoundedDouble.NaN; } } + + [PropertyOrder(9)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_Convergence_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Convergence_WaveHeight_Description))] + public string Convergence + { + get + { + CalculationConvergence convergence = data.Output?.CalculationConvergence ?? CalculationConvergence.NotCalculated; + + return new EnumDisplayWrapper(convergence).DisplayName; + } + } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationPropertiesTest.cs =================================================================== diff -u -ra97621ac8c9fc06d1f040daf5f7e6bffcd84dae0 -r3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationPropertiesTest.cs (.../DesignWaterLevelLocationPropertiesTest.cs) (revision a97621ac8c9fc06d1f040daf5f7e6bffcd84dae0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationPropertiesTest.cs (.../DesignWaterLevelLocationPropertiesTest.cs) (revision 3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7) @@ -23,6 +23,7 @@ using System.ComponentModel; using Core.Common.Gui.Converters; using Core.Common.TestUtil; +using Core.Common.Util; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.TestUtil; @@ -157,7 +158,10 @@ public void Constructor_WithGeneralIllustrationPointsResult_PropertiesHaveExpectedAttributesValues() { // Setup - var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); + var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()) + { + Output = new TestHydraulicBoundaryLocationOutput(new TestGeneralResultSubMechanismIllustrationPoint()) + }; // Call var properties = new DesignWaterLevelLocationProperties(hydraulicBoundaryLocationCalculation); @@ -280,13 +284,14 @@ // Setup var random = new Random(); double designWaterLevel = random.NextDouble(); + var convergence = random.NextEnumValue(); var hydraulicBoundaryLocationOutput = new HydraulicBoundaryLocationOutput(designWaterLevel, random.NextDouble(), random.NextDouble(), random.NextDouble(), random.NextDouble(), - random.NextEnumValue(), + convergence, new TestGeneralResultSubMechanismIllustrationPoint()); var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()) @@ -299,6 +304,9 @@ // Assert Assert.AreEqual(hydraulicBoundaryLocationCalculation.Output.Result, properties.DesignWaterLevel, hydraulicBoundaryLocationCalculation.Output.Result.GetAccuracy()); + + string convergenceValue = new EnumDisplayWrapper(convergence).DisplayName; + Assert.AreEqual(convergenceValue, properties.Convergence); } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs =================================================================== diff -u -ra5eb5c3f7ed90adc9875439ab6fd1eea6f74ab18 -r3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision a5eb5c3f7ed90adc9875439ab6fd1eea6f74ab18) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7) @@ -26,7 +26,6 @@ using Core.Common.Base.Geometry; using Core.Common.Gui.Converters; using Core.Common.TestUtil; -using Core.Common.Util; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.Hydraulics; @@ -47,12 +46,11 @@ private const int targetReliabilityPropertyIndex = 4; private const int calculatedProbabilityPropertyIndex = 5; private const int calculatedReliabilityPropertyIndex = 6; - private const int convergencePropertyIndex = 7; - private const int shouldCalculateIllustrationPointsIndex = 8; - private const int governingWindDirectionIndex = 9; - private const int alphaValuesIndex = 10; - private const int durationsIndex = 11; - private const int illustrationPointsIndex = 12; + private const int shouldCalculateIllustrationPointsIndex = 7; + private const int governingWindDirectionIndex = 8; + private const int alphaValuesIndex = 9; + private const int durationsIndex = 10; + private const int illustrationPointsIndex = 11; [Test] public void Constructor_HydraulicBoundaryLocationCalculationNull_ThrowsArgumentNullException() @@ -79,7 +77,7 @@ Assert.IsInstanceOf(classTypeConverter); PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(9, dynamicProperties.Count); + Assert.AreEqual(8, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string resultCategory = "Resultaat"; @@ -134,13 +132,6 @@ "Betrouwbaarheidsindex van de berekende kans van voorkomen van het berekende resultaat.", true); - PropertyDescriptor convergenceProperty = dynamicProperties[convergencePropertyIndex]; - PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(convergenceProperty, - resultCategory, - "Convergentie", - "Is convergentie bereikt in de toetspeil berekening?", - true); - PropertyDescriptor calculateIllustrationPointsProperty = dynamicProperties[shouldCalculateIllustrationPointsIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(calculateIllustrationPointsProperty, illustrationPointsCategory, @@ -152,7 +143,10 @@ public void Constructor_WithGeneralIllustrationPointsResult_PropertiesHaveExpectedAttributesValues() { // Setup - var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); + var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()) + { + Output = new TestHydraulicBoundaryLocationOutput(new TestGeneralResultSubMechanismIllustrationPoint()) + }; // Call var properties = new TestHydraulicBoundaryLocationProperties(hydraulicBoundaryLocationCalculation); @@ -162,7 +156,7 @@ Assert.IsInstanceOf(classTypeConverter); PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(13, dynamicProperties.Count); + Assert.AreEqual(12, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string resultCategory = "Resultaat"; @@ -217,13 +211,6 @@ "Betrouwbaarheidsindex van de berekende kans van voorkomen van het berekende resultaat.", true); - PropertyDescriptor convergenceProperty = dynamicProperties[convergencePropertyIndex]; - PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(convergenceProperty, - resultCategory, - "Convergentie", - "Is convergentie bereikt in de toetspeil berekening?", - true); - PropertyDescriptor calculateIllustrationPointsProperty = dynamicProperties[shouldCalculateIllustrationPointsIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(calculateIllustrationPointsProperty, illustrationPointsCategory, @@ -325,9 +312,6 @@ Assert.AreEqual(calculatedProbability, properties.CalculatedProbability); Assert.AreEqual(calculatedReliability, properties.CalculatedReliability, properties.CalculatedReliability.GetAccuracy()); - string convergenceValue = new EnumDisplayWrapper(convergence).DisplayName; - Assert.AreEqual(convergenceValue, properties.Convergence); - if (withIllustrationPoints) { GeneralResult expectedGeneralResult = hydraulicBoundaryLocationOutput.GeneralResult; Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationPropertiesTest.cs =================================================================== diff -u -r3c84f0e17aa468000838418a03bd54aa946ab35f -r3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationPropertiesTest.cs (.../WaveHeightLocationPropertiesTest.cs) (revision 3c84f0e17aa468000838418a03bd54aa946ab35f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationPropertiesTest.cs (.../WaveHeightLocationPropertiesTest.cs) (revision 3bba243ccce3db2adfed6d4cdf6884c2d54b3fa7) @@ -23,6 +23,7 @@ using System.ComponentModel; using Core.Common.Gui.Converters; using Core.Common.TestUtil; +using Core.Common.Util; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.TestUtil; @@ -143,7 +144,7 @@ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(convergenceProperty, resultCategory, "Convergentie", - "Is convergentie bereikt in de toetspeil berekening?", + "Is convergentie bereikt in de golfhoogte berekening?", true); PropertyDescriptor calculateIllustrationPointsProperty = dynamicProperties[shouldCalculateIllustrationPointsIndex]; @@ -157,7 +158,10 @@ public void Constructor_WithGeneralIllustrationPointsResult_PropertiesHaveExpectedAttributesValues() { // Setup - var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); + var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()) + { + Output = new TestHydraulicBoundaryLocationOutput(new TestGeneralResultSubMechanismIllustrationPoint()) + }; // Call var properties = new WaveHeightLocationProperties(hydraulicBoundaryLocationCalculation); @@ -233,7 +237,7 @@ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(convergenceProperty, resultCategory, "Convergentie", - "Is convergentie bereikt in de toetspeil berekening?", + "Is convergentie bereikt in de golfhoogte berekening?", true); PropertyDescriptor calculateIllustrationPointsProperty = dynamicProperties[shouldCalculateIllustrationPointsIndex]; @@ -280,13 +284,14 @@ // Setup var random = new Random(); double waveHeight = random.NextDouble(); + var convergence = random.NextEnumValue(); var hydraulicBoundaryLocationOutput = new HydraulicBoundaryLocationOutput(waveHeight, random.NextDouble(), random.NextDouble(), random.NextDouble(), random.NextDouble(), - random.NextEnumValue(), + convergence, new TestGeneralResultSubMechanismIllustrationPoint()); var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()) @@ -299,6 +304,9 @@ // Assert Assert.AreEqual(hydraulicBoundaryLocationCalculation.Output.Result, properties.WaveHeight, hydraulicBoundaryLocationCalculation.Output.Result.GetAccuracy()); + + string convergenceValue = new EnumDisplayWrapper(convergence).DisplayName; + Assert.AreEqual(convergenceValue, properties.Convergence); } } } \ No newline at end of file