Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs
===================================================================
diff -u -rab2f7996c204ca193fb728b3983b75a97c92c7b6 -r0f61433cb005ad04374dbe99e0a553b967afe64d
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision ab2f7996c204ca193fb728b3983b75a97c92c7b6)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision 0f61433cb005ad04374dbe99e0a553b967afe64d)
@@ -33,7 +33,6 @@
internal class GrassCoverErosionInwardsCalculationActivity : CalculatableActivity
{
private readonly GrassCoverErosionInwardsCalculation calculation;
- private readonly string hydraulicBoundaryDatabaseFilePath;
private readonly GrassCoverErosionInwardsFailureMechanism failureMechanism;
private readonly IAssessmentSection assessmentSection;
private readonly GrassCoverErosionInwardsCalculationService calculationService;
@@ -42,21 +41,14 @@
/// Creates a new instance of .
///
/// The height structures data used for the calculation.
- /// The path which points to the hydraulic boundary database file.
/// The failure mechanism the calculation belongs to.
/// The assessment section the calculation belongs to.
/// Thrown when any input argument is null.
public GrassCoverErosionInwardsCalculationActivity(GrassCoverErosionInwardsCalculation calculation,
- string hydraulicBoundaryDatabaseFilePath,
GrassCoverErosionInwardsFailureMechanism failureMechanism,
IAssessmentSection assessmentSection)
: base(calculation)
{
- if (hydraulicBoundaryDatabaseFilePath == null)
- {
- throw new ArgumentNullException(nameof(hydraulicBoundaryDatabaseFilePath));
- }
-
if (failureMechanism == null)
{
throw new ArgumentNullException(nameof(failureMechanism));
@@ -68,7 +60,6 @@
}
this.calculation = calculation;
- this.hydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath;
this.failureMechanism = failureMechanism;
this.assessmentSection = assessmentSection;
@@ -94,7 +85,7 @@
assessmentSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- hydraulicBoundaryDatabaseFilePath);
+ assessmentSection.HydraulicBoundaryDatabase.FilePath);
}
protected override void OnCancel()
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivityFactory.cs
===================================================================
diff -u -rd088de29dabf3bcca2e68c766745ef6b5fc62050 -r0f61433cb005ad04374dbe99e0a553b967afe64d
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivityFactory.cs (.../GrassCoverErosionInwardsCalculationActivityFactory.cs) (revision d088de29dabf3bcca2e68c766745ef6b5fc62050)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivityFactory.cs (.../GrassCoverErosionInwardsCalculationActivityFactory.cs) (revision 0f61433cb005ad04374dbe99e0a553b967afe64d)
@@ -124,7 +124,6 @@
}
return new GrassCoverErosionInwardsCalculationActivity(calculation,
- assessmentSection.HydraulicBoundaryDatabase.FilePath,
failureMechanism,
assessmentSection);
}
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationActivityTest.cs
===================================================================
diff -u -ra494bde768f1b989d31bff6a801a1816d6f9692e -r0f61433cb005ad04374dbe99e0a553b967afe64d
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationActivityTest.cs (.../GrassCoverErosionInwardsCalculationActivityTest.cs) (revision a494bde768f1b989d31bff6a801a1816d6f9692e)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationActivityTest.cs (.../GrassCoverErosionInwardsCalculationActivityTest.cs) (revision 0f61433cb005ad04374dbe99e0a553b967afe64d)
@@ -44,7 +44,7 @@
var calculation = new GrassCoverErosionInwardsCalculation();
// Call
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, "", failureMechanism, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, failureMechanism, assessmentSection);
// Assert
Assert.IsInstanceOf(activity);
@@ -56,26 +56,6 @@
}
[Test]
- public void ParameteredConstructor_HydraulicBoundaryDatabaseFilePathNull_ThrowsArgumentNullException()
- {
- // Setup
- var mocks = new MockRepository();
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
-
- var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
- var calculation = new GrassCoverErosionInwardsCalculation();
-
- // Call
- TestDelegate call = () => new GrassCoverErosionInwardsCalculationActivity(calculation, null, failureMechanism, assessmentSection);
-
- // Assert
- var exception = Assert.Throws(call);
- Assert.AreEqual("hydraulicBoundaryDatabaseFilePath", exception.ParamName);
- mocks.VerifyAll();
- }
-
- [Test]
public void ParameteredConstructor_FailureMechanismNull_ThrowsArgumentNullException()
{
// Setup
@@ -86,7 +66,7 @@
var calculation = new GrassCoverErosionInwardsCalculation();
// Call
- TestDelegate call = () => new GrassCoverErosionInwardsCalculationActivity(calculation, "", null, assessmentSection);
+ TestDelegate call = () => new GrassCoverErosionInwardsCalculationActivity(calculation, null, assessmentSection);
// Assert
var exception = Assert.Throws(call);
@@ -102,7 +82,7 @@
var calculation = new GrassCoverErosionInwardsCalculation();
// Call
- TestDelegate call = () => new GrassCoverErosionInwardsCalculationActivity(calculation, "", failureMechanism, null);
+ TestDelegate call = () => new GrassCoverErosionInwardsCalculationActivity(calculation, failureMechanism, null);
// Assert
var exception = Assert.Throws(call);