Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs =================================================================== diff -u -r4c9281162ddc3a03e3e658addfad69f4b8f9762f -r7600caf75be609f1bc0de5ebb9619bd95088e83a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs (.../ClosingStructuresCalculationActivity.cs) (revision 4c9281162ddc3a03e3e658addfad69f4b8f9762f) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs (.../ClosingStructuresCalculationActivity.cs) (revision 7600caf75be609f1bc0de5ebb9619bd95088e83a) @@ -38,27 +38,19 @@ private readonly ClosingStructuresCalculationService calculationService; private readonly ClosingStructuresFailureMechanism failureMechanism; private readonly IAssessmentSection assessmentSection; - private readonly string hydraulicBoundaryDatabaseFilePath; /// /// Creates a new instance of . /// /// The closing 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 ClosingStructuresCalculationActivity(StructuresCalculation calculation, - string hydraulicBoundaryDatabaseFilePath, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(calculation) { - if (hydraulicBoundaryDatabaseFilePath == null) - { - throw new ArgumentNullException(nameof(hydraulicBoundaryDatabaseFilePath)); - } - if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); @@ -72,7 +64,6 @@ this.calculation = calculation; this.failureMechanism = failureMechanism; this.assessmentSection = assessmentSection; - this.hydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath; Description = string.Format(RingtoetsCommonServiceResources.Perform_calculation_with_name_0_, calculation.Name); @@ -90,7 +81,7 @@ calculationService.Calculate(calculation, failureMechanism.GeneralInput, - hydraulicBoundaryDatabaseFilePath, + assessmentSection.HydraulicBoundaryDatabase.FilePath, assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory()); } Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivityFactory.cs =================================================================== diff -u -r98a125ff548eea9ab7d95285aa8d136a63f899f7 -r7600caf75be609f1bc0de5ebb9619bd95088e83a --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivityFactory.cs (.../ClosingStructuresCalculationActivityFactory.cs) (revision 98a125ff548eea9ab7d95285aa8d136a63f899f7) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivityFactory.cs (.../ClosingStructuresCalculationActivityFactory.cs) (revision 7600caf75be609f1bc0de5ebb9619bd95088e83a) @@ -125,7 +125,6 @@ } return new ClosingStructuresCalculationActivity(calculation, - assessmentSection.HydraulicBoundaryDatabase.FilePath, failureMechanism, assessmentSection); } Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs =================================================================== diff -u -ra494bde768f1b989d31bff6a801a1816d6f9692e -r7600caf75be609f1bc0de5ebb9619bd95088e83a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs (.../ClosingStructuresCalculationActivityTest.cs) (revision a494bde768f1b989d31bff6a801a1816d6f9692e) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs (.../ClosingStructuresCalculationActivityTest.cs) (revision 7600caf75be609f1bc0de5ebb9619bd95088e83a) @@ -45,7 +45,7 @@ var calculation = new StructuresCalculation(); // Call - var activity = new ClosingStructuresCalculationActivity(calculation, "", failureMechanism, assessmentSection); + var activity = new ClosingStructuresCalculationActivity(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 ClosingStructuresFailureMechanism(); - var calculation = new StructuresCalculation(); - - // Call - TestDelegate call = () => new ClosingStructuresCalculationActivity(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 ClosingStructuresCalculationActivity(calculation, "", null, assessmentSection); + TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, null, assessmentSection); // Assert var exception = Assert.Throws(call); @@ -103,7 +83,7 @@ var calculation = new StructuresCalculation(); // Call - TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, "", failureMechanism, null); + TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, failureMechanism, null); // Assert var exception = Assert.Throws(call);