Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs =================================================================== diff -u -rad30ede784f5cb85ecf6e652fd2cef506c22208f -r11e7c2e548d48f66821c2739966ba2ae6cf1dc9c --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision ad30ede784f5cb85ecf6e652fd2cef506c22208f) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision 11e7c2e548d48f66821c2739966ba2ae6cf1dc9c) @@ -35,7 +35,6 @@ internal class HeightStructuresCalculationActivity : CalculatableActivity { private readonly StructuresCalculation calculation; - private readonly string hydraulicBoundaryDatabaseFilePath; private readonly HeightStructuresFailureMechanism failureMechanism; private readonly IAssessmentSection assessmentSection; private readonly HeightStructuresCalculationService calculationService; @@ -44,21 +43,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 HeightStructuresCalculationActivity(StructuresCalculation calculation, - string hydraulicBoundaryDatabaseFilePath, HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(calculation) { - if (hydraulicBoundaryDatabaseFilePath == null) - { - throw new ArgumentNullException(nameof(hydraulicBoundaryDatabaseFilePath)); - } - if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); @@ -70,7 +62,6 @@ } this.calculation = calculation; - this.hydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath; this.failureMechanism = failureMechanism; this.assessmentSection = assessmentSection; @@ -90,7 +81,7 @@ calculationService.Calculate(calculation, failureMechanism.GeneralInput, - hydraulicBoundaryDatabaseFilePath, + assessmentSection.HydraulicBoundaryDatabase.FilePath, assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory()); } Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivityFactory.cs =================================================================== diff -u -r847c0865b3c3e8478049321fa436a80c1f1ab43b -r11e7c2e548d48f66821c2739966ba2ae6cf1dc9c --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivityFactory.cs (.../HeightStructuresCalculationActivityFactory.cs) (revision 847c0865b3c3e8478049321fa436a80c1f1ab43b) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivityFactory.cs (.../HeightStructuresCalculationActivityFactory.cs) (revision 11e7c2e548d48f66821c2739966ba2ae6cf1dc9c) @@ -125,7 +125,6 @@ } return new HeightStructuresCalculationActivity(calculation, - assessmentSection.HydraulicBoundaryDatabase.FilePath, failureMechanism, assessmentSection); } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationActivityTest.cs =================================================================== diff -u -ra494bde768f1b989d31bff6a801a1816d6f9692e -r11e7c2e548d48f66821c2739966ba2ae6cf1dc9c --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationActivityTest.cs (.../HeightStructuresCalculationActivityTest.cs) (revision a494bde768f1b989d31bff6a801a1816d6f9692e) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationActivityTest.cs (.../HeightStructuresCalculationActivityTest.cs) (revision 11e7c2e548d48f66821c2739966ba2ae6cf1dc9c) @@ -45,7 +45,7 @@ var calculation = new StructuresCalculation(); // Call - var activity = new HeightStructuresCalculationActivity(calculation, "", failureMechanism, assessmentSection); + var activity = new HeightStructuresCalculationActivity(calculation, failureMechanism, assessmentSection); // Assert Assert.IsInstanceOf(activity); @@ -57,26 +57,6 @@ } [Test] - public void ParameteredConstructor_HlcdFilepathNull_ThrowsArgumentNullException() - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - var failureMechanism = new HeightStructuresFailureMechanism(); - var calculation = new StructuresCalculation(); - - // Call - TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, null, failureMechanism, assessmentSection); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("hydraulicBoundaryDatabaseFilePath", exception.ParamName); - mocks.VerifyAll(); - } - - [Test] public void ParameteredConstructor_FailureMechanismNull_ThrowsArgumentNullException() { // Setup @@ -87,7 +67,7 @@ var calculation = new StructuresCalculation(); // Call - TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, "", null, assessmentSection); + TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, null, assessmentSection); // Assert var exception = Assert.Throws(call); @@ -103,7 +83,7 @@ var calculation = new StructuresCalculation(); // Call - TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, "", failureMechanism, null); + TestDelegate call = () => new HeightStructuresCalculationActivity(calculation, failureMechanism, null); // Assert var exception = Assert.Throws(call);