Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationsContext.cs
===================================================================
diff -u -radadf1a820c1c6f418f30411352bf661214dd2ae -r53e807c3cfcb099ec4471897a4bbc46aa7040b16
--- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationsContext.cs (.../DuneLocationsContext.cs) (revision adadf1a820c1c6f418f30411352bf661214dd2ae)
+++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationsContext.cs (.../DuneLocationsContext.cs) (revision 53e807c3cfcb099ec4471897a4bbc46aa7040b16)
@@ -28,18 +28,18 @@
namespace Ringtoets.DuneErosion.Forms.PresentationObjects
{
///
- /// Presentation object for Hydraulic boundary locations.
+ /// Presentation object for dune location calculations.
///
- public class DuneLocationsContext : ObservableWrappedObjectContextBase>
+ public class DuneLocationsContext : ObservableWrappedObjectContextBase>
{
///
/// Creates a new instance of .
///
/// The dune locations for dune erosion failure mechanism.
- /// The dune erosion failure mechanism which the locations belong to.
- /// The assessment section the locations belong to.
+ /// The dune erosion failure mechanism which the calculations belong to.
+ /// The assessment section the calculations belong to.
/// Thrown when any input argument is null.
- public DuneLocationsContext(ObservableList duneLocations,
+ public DuneLocationsContext(IObservableEnumerable duneLocations,
DuneErosionFailureMechanism failureMechanism,
IAssessmentSection assessmentSection)
: base(duneLocations)
@@ -48,10 +48,12 @@
{
throw new ArgumentNullException(nameof(failureMechanism));
}
+
if (assessmentSection == null)
{
throw new ArgumentNullException(nameof(assessmentSection));
}
+
AssessmentSection = assessmentSection;
FailureMechanism = failureMechanism;
}
Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PresentationObjects/DuneLocationsContextTest.cs
===================================================================
diff -u -r1bbf51443c907b5f202e80764fa05f2e7f842c04 -r53e807c3cfcb099ec4471897a4bbc46aa7040b16
--- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PresentationObjects/DuneLocationsContextTest.cs (.../DuneLocationsContextTest.cs) (revision 1bbf51443c907b5f202e80764fa05f2e7f842c04)
+++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PresentationObjects/DuneLocationsContextTest.cs (.../DuneLocationsContextTest.cs) (revision 53e807c3cfcb099ec4471897a4bbc46aa7040b16)
@@ -40,14 +40,16 @@
var mockRepository = new MockRepository();
var assessmentSection = mockRepository.Stub();
mockRepository.ReplayAll();
+
var failureMechanism = new DuneErosionFailureMechanism();
+ var duneLocationCalculations = new ObservableList();
// Call
- var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection);
+ var context = new DuneLocationsContext(duneLocationCalculations, failureMechanism, assessmentSection);
// Assert
- Assert.IsInstanceOf>>(context);
- Assert.AreSame(failureMechanism.DuneLocations, context.WrappedData);
+ Assert.IsInstanceOf>>(context);
+ Assert.AreSame(duneLocationCalculations, context.WrappedData);
Assert.AreSame(failureMechanism, context.FailureMechanism);
Assert.AreSame(assessmentSection, context.AssessmentSection);
mockRepository.VerifyAll();
@@ -62,7 +64,9 @@
mockRepository.ReplayAll();
// Call
- TestDelegate call = () => new DuneLocationsContext(new ObservableList(), null, assessmentSection);
+ TestDelegate call = () => new DuneLocationsContext(new ObservableList(),
+ null,
+ assessmentSection);
// Assert
string paramName = Assert.Throws(call).ParamName;
@@ -77,7 +81,9 @@
var failureMechanism = new DuneErosionFailureMechanism();
// Call
- TestDelegate call = () => new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, null);
+ TestDelegate call = () => new DuneLocationsContext(new ObservableList(),
+ new DuneErosionFailureMechanism(),
+ null);
// Assert
string paramName = Assert.Throws(call).ParamName;