Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs =================================================================== diff -u -r0f28eb71a18af127ad376776ebd2cd597a0aa5c5 -re48e9ad9cf53e5de8c4dd076e55b2fd380fe191a --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision 0f28eb71a18af127ad376776ebd2cd597a0aa5c5) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision e48e9ad9cf53e5de8c4dd076e55b2fd380fe191a) @@ -42,27 +42,39 @@ public abstract class HydraulicBoundaryLocationProperties : ObjectProperties { private readonly Dictionary propertyIndexLookup; + protected readonly HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation; /// /// Creates a new instance of . /// /// The hydraulic boundary location. + /// The hydraulic boundary location calculation at stake. /// The containing the property indices. /// Thrown when /// or is null. - protected HydraulicBoundaryLocationProperties(HydraulicBoundaryLocation hydraulicBoundaryLocation, ConstructionProperties propertyIndexes) + protected HydraulicBoundaryLocationProperties(HydraulicBoundaryLocation hydraulicBoundaryLocation, + HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation, + ConstructionProperties propertyIndexes) { if (hydraulicBoundaryLocation == null) { throw new ArgumentNullException(nameof(hydraulicBoundaryLocation)); } + if (hydraulicBoundaryLocationCalculation == null) + { + throw new ArgumentNullException(nameof(hydraulicBoundaryLocationCalculation)); + } + if (propertyIndexes == null) { throw new ArgumentNullException(nameof(propertyIndexes)); } Data = hydraulicBoundaryLocation; + + this.hydraulicBoundaryLocationCalculation = hydraulicBoundaryLocationCalculation; + propertyIndexLookup = new Dictionary { { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs =================================================================== diff -u -r75d12c89224759df39acf21f187f309a3e4ae274 -re48e9ad9cf53e5de8c4dd076e55b2fd380fe191a --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 75d12c89224759df39acf21f187f309a3e4ae274) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision e48e9ad9cf53e5de8c4dd076e55b2fd380fe191a) @@ -43,21 +43,34 @@ public void Constructor_HydraulicBoundaryLocationNull_ThrowsArgumentNullException() { // Call - TestDelegate test = () => new TestHydraulicBoundaryLocationProperties(null); + TestDelegate test = () => new TestHydraulicBoundaryLocationProperties(null, new HydraulicBoundaryLocationCalculation()); // Assert string paramName = Assert.Throws(test).ParamName; Assert.AreEqual("hydraulicBoundaryLocation", paramName); } [Test] - public void Constructor_ConstructionPropertiesNull_ThrowsArgumentNullException() + public void Constructor_HydraulicBoundaryLocationCalculationNull_ThrowsArgumentNullException() { // Call TestDelegate test = () => new TestHydraulicBoundaryLocationProperties(new TestHydraulicBoundaryLocation(), null); // Assert string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("hydraulicBoundaryLocationCalculation", paramName); + } + + [Test] + public void Constructor_ConstructionPropertiesNull_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => new TestHydraulicBoundaryLocationProperties(new TestHydraulicBoundaryLocation(), + new HydraulicBoundaryLocationCalculation(), + null); + + // Assert + string paramName = Assert.Throws(test).ParamName; Assert.AreEqual("propertyIndexes", paramName); } @@ -289,12 +302,18 @@ { public GeneralResult GeneralResult; - public TestHydraulicBoundaryLocationProperties(HydraulicBoundaryLocation hydraulicBoundaryLocation) - : base(hydraulicBoundaryLocation, new ConstructionProperties()) {} + public TestHydraulicBoundaryLocationProperties(HydraulicBoundaryLocation hydraulicBoundaryLocation, + HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation) + : base(hydraulicBoundaryLocation, + hydraulicBoundaryLocationCalculation, + new ConstructionProperties()) {} public TestHydraulicBoundaryLocationProperties(HydraulicBoundaryLocation hydraulicBoundaryLocation, + HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation, ConstructionProperties propertyIndexes) - : base(hydraulicBoundaryLocation, propertyIndexes) {} + : base(hydraulicBoundaryLocation, + hydraulicBoundaryLocationCalculation, + propertyIndexes) {} protected override GeneralResult GetGeneralResult() {