Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/DesignWaterLevelLocationContext.cs
===================================================================
diff -u -rb17eb09f96cdd37af57cb0c615d36366298abc07 -r4dfedddc797825c49f4ca459dc38be7bc9978ccb
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/DesignWaterLevelLocationContext.cs (.../DesignWaterLevelLocationContext.cs) (revision b17eb09f96cdd37af57cb0c615d36366298abc07)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/DesignWaterLevelLocationContext.cs (.../DesignWaterLevelLocationContext.cs) (revision 4dfedddc797825c49f4ca459dc38be7bc9978ccb)
@@ -39,6 +39,6 @@
/// Thrown when any input parameter is null.
public DesignWaterLevelLocationContext(HydraulicBoundaryLocation wrappedData,
HydraulicBoundaryLocationCalculation calculation)
- : base(wrappedData, calculation) {}
+ : base(calculation) {}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/HydraulicBoundaryLocationContext.cs
===================================================================
diff -u -rb17eb09f96cdd37af57cb0c615d36366298abc07 -r4dfedddc797825c49f4ca459dc38be7bc9978ccb
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/HydraulicBoundaryLocationContext.cs (.../HydraulicBoundaryLocationContext.cs) (revision b17eb09f96cdd37af57cb0c615d36366298abc07)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/HydraulicBoundaryLocationContext.cs (.../HydraulicBoundaryLocationContext.cs) (revision 4dfedddc797825c49f4ca459dc38be7bc9978ccb)
@@ -26,32 +26,17 @@
namespace Ringtoets.Integration.Forms.PresentationObjects
{
///
- /// Presentation object for all data required to configure an instance of .
+ /// Presentation object for all data required to configure an instance of .
///
- public abstract class HydraulicBoundaryLocationContext : ObservableWrappedObjectContextBase
+ public abstract class HydraulicBoundaryLocationContext : ObservableWrappedObjectContextBase
{
///
/// Creates a new instance of .
///
- /// The which the
- /// belongs to.
- /// The at stake.
- /// Thrown when any input parameter is null.
- protected HydraulicBoundaryLocationContext(HydraulicBoundaryLocation wrappedData,
- HydraulicBoundaryLocationCalculation calculation)
- : base(wrappedData)
- {
- if (calculation == null)
- {
- throw new ArgumentNullException(nameof(calculation));
- }
-
- Calculation = calculation;
- }
-
- ///
- /// Gets the at stake.
- ///
- public HydraulicBoundaryLocationCalculation Calculation { get; }
+ /// The which the
+ /// belongs to.
+ /// Thrown when is null.
+ protected HydraulicBoundaryLocationContext(HydraulicBoundaryLocationCalculation wrappedData)
+ : base(wrappedData) {}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/WaveHeightLocationContext.cs
===================================================================
diff -u -rb17eb09f96cdd37af57cb0c615d36366298abc07 -r4dfedddc797825c49f4ca459dc38be7bc9978ccb
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/WaveHeightLocationContext.cs (.../WaveHeightLocationContext.cs) (revision b17eb09f96cdd37af57cb0c615d36366298abc07)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/WaveHeightLocationContext.cs (.../WaveHeightLocationContext.cs) (revision 4dfedddc797825c49f4ca459dc38be7bc9978ccb)
@@ -39,6 +39,6 @@
/// Thrown when any input parameter is null.
public WaveHeightLocationContext(HydraulicBoundaryLocation hydraulicBoundaryLocation,
HydraulicBoundaryLocationCalculation calculation)
- : base(hydraulicBoundaryLocation, calculation) {}
+ : base(calculation) {}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs
===================================================================
diff -u -ra64d9feaca1f48e4549264af463c89ca6979f5d9 -r4dfedddc797825c49f4ca459dc38be7bc9978ccb
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision a64d9feaca1f48e4549264af463c89ca6979f5d9)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 4dfedddc797825c49f4ca459dc38be7bc9978ccb)
@@ -339,7 +339,7 @@
};
yield return new PropertyInfo
{
- CreateInstance = context => new DesignWaterLevelCalculationProperties(context.Calculation)
+ CreateInstance = context => new DesignWaterLevelCalculationProperties(context.WrappedData)
};
yield return new PropertyInfo
{
@@ -354,7 +354,7 @@
};
yield return new PropertyInfo
{
- CreateInstance = context => new WaveHeightCalculationProperties(context.Calculation)
+ CreateInstance = context => new WaveHeightCalculationProperties(context.WrappedData)
};
yield return new PropertyInfo();
yield return new PropertyInfo
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationContextTest.cs
===================================================================
diff -u -re61200e6c946ac66439f9788cb96dd1ca76c1a7d -r4dfedddc797825c49f4ca459dc38be7bc9978ccb
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationContextTest.cs (.../DesignWaterLevelLocationContextTest.cs) (revision e61200e6c946ac66439f9788cb96dd1ca76c1a7d)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationContextTest.cs (.../DesignWaterLevelLocationContextTest.cs) (revision 4dfedddc797825c49f4ca459dc38be7bc9978ccb)
@@ -40,8 +40,7 @@
// Assert
Assert.IsInstanceOf(presentationObject);
- Assert.AreSame(hydraulicBoundaryLocation, presentationObject.WrappedData);
- Assert.AreSame(hydraulicBoundaryLocationCalculation, presentationObject.Calculation);
+ Assert.AreSame(hydraulicBoundaryLocationCalculation, presentationObject.WrappedData);
}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/HydraulicBoundaryLocationContextTest.cs
===================================================================
diff -u -re61200e6c946ac66439f9788cb96dd1ca76c1a7d -r4dfedddc797825c49f4ca459dc38be7bc9978ccb
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/HydraulicBoundaryLocationContextTest.cs (.../HydraulicBoundaryLocationContextTest.cs) (revision e61200e6c946ac66439f9788cb96dd1ca76c1a7d)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/HydraulicBoundaryLocationContextTest.cs (.../HydraulicBoundaryLocationContextTest.cs) (revision 4dfedddc797825c49f4ca459dc38be7bc9978ccb)
@@ -19,10 +19,10 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System;
using Core.Common.Controls.PresentationObjects;
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Integration.Forms.PresentationObjects;
namespace Ringtoets.Integration.Forms.Test.PresentationObjects
@@ -31,40 +31,23 @@
public class HydraulicBoundaryLocationContextTest
{
[Test]
- public void Constructor_CalculationNull_ThrowsArgumentNullException()
- {
- // Setup
- var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "Name", 2.0, 3.0);
-
- // Call
- TestDelegate test = () => new TestHydraulicBoundaryLocationContext(hydraulicBoundaryLocation, null);
-
- // Assert
- string paramName = Assert.Throws(test).ParamName;
- Assert.AreEqual("calculation", paramName);
- }
-
- [Test]
public void Constructor_ValidParameters_ExpectedValues()
{
// Setup
- var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "Name", 2.0, 3.0);
- var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation);
+ var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation());
// Call
- var context = new TestHydraulicBoundaryLocationContext(hydraulicBoundaryLocation, hydraulicBoundaryLocationCalculation);
+ var context = new TestHydraulicBoundaryLocationContext(hydraulicBoundaryLocationCalculation);
// Assert
- Assert.IsInstanceOf>(context);
- Assert.AreSame(hydraulicBoundaryLocation, context.WrappedData);
- Assert.AreSame(hydraulicBoundaryLocationCalculation, context.Calculation);
+ Assert.IsInstanceOf>(context);
+ Assert.AreSame(hydraulicBoundaryLocationCalculation, context.WrappedData);
}
private class TestHydraulicBoundaryLocationContext : HydraulicBoundaryLocationContext
{
- public TestHydraulicBoundaryLocationContext(HydraulicBoundaryLocation wrappedData,
- HydraulicBoundaryLocationCalculation calculation)
- : base(wrappedData, calculation) {}
+ public TestHydraulicBoundaryLocationContext(HydraulicBoundaryLocationCalculation calculation)
+ : base(calculation) {}
}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationContextTest.cs
===================================================================
diff -u -re61200e6c946ac66439f9788cb96dd1ca76c1a7d -r4dfedddc797825c49f4ca459dc38be7bc9978ccb
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationContextTest.cs (.../WaveHeightLocationContextTest.cs) (revision e61200e6c946ac66439f9788cb96dd1ca76c1a7d)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationContextTest.cs (.../WaveHeightLocationContextTest.cs) (revision 4dfedddc797825c49f4ca459dc38be7bc9978ccb)
@@ -40,8 +40,7 @@
// Assert
Assert.IsInstanceOf(presentationObject);
- Assert.AreSame(hydraulicBoundaryLocation, presentationObject.WrappedData);
- Assert.AreSame(hydraulicBoundaryLocationCalculation, presentationObject.Calculation);
+ Assert.AreSame(hydraulicBoundaryLocationCalculation, presentationObject.WrappedData);
}
}
}
\ No newline at end of file