Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs
===================================================================
diff -u -r8e96b925c595afd1eae7e34b6798099dab7ee99a -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 8e96b925c595afd1eae7e34b6798099dab7ee99a)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -570,7 +570,11 @@
private void InitializeDemoHydraulicBoundaryDatabase(AssessmentSection demoAssessmentSection)
{
- using (var embeddedResourceFileWriter = new EmbeddedResourceFileWriter(GetType().Assembly, false, "HRD dutch coast south.sqlite", "HLCD.sqlite"))
+ using (var embeddedResourceFileWriter = new EmbeddedResourceFileWriter(GetType().Assembly,
+ false,
+ "HRD dutch coast south.sqlite",
+ "HLCD.sqlite",
+ "HRD dutch coast south.config.sqlite"))
{
using (var hydraulicBoundaryDatabaseImporter = new HydraulicBoundaryDatabaseImporter())
{
Index: Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj
===================================================================
diff -u -r6bb7ea5908ee78a9185a1ed8346c99f4c6b763e0 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision 6bb7ea5908ee78a9185a1ed8346c99f4c6b763e0)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -249,6 +249,7 @@
+
Index: Demo/Ringtoets/src/Demo.Ringtoets/Resources/HRD dutch coast south.config.sqlite
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/HydraulicBoundaryDatabaseImporter.cs
===================================================================
diff -u -re4565100f14feece0bea5bc7acf9eef9acf7a8e6 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/HydraulicBoundaryDatabaseImporter.cs (.../HydraulicBoundaryDatabaseImporter.cs) (revision e4565100f14feece0bea5bc7acf9eef9acf7a8e6)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/HydraulicBoundaryDatabaseImporter.cs (.../HydraulicBoundaryDatabaseImporter.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -125,6 +125,18 @@
var message = new FileReaderErrorMessageBuilder(filePath).Build(Resources.HydraulicBoundaryDatabaseImporter_HLCD_sqlite_Not_Found);
throw new CriticalFileReadException(message);
}
+ try
+ {
+ string settingsDatabaseFileName = HydraulicDatabaseHelper.GetHydraulicBoundarySettingsDatabase(filePath);
+ new DesignTablesSettingsProvider(settingsDatabaseFileName).Dispose();
+ new HydraulicModelsSettingsProvider(settingsDatabaseFileName).Dispose();
+ new NumericsSettingsProvider(settingsDatabaseFileName).Dispose();
+ }
+ catch (CriticalFileReadException)
+ {
+ var message = new FileReaderErrorMessageBuilder(filePath).Build(Resources.HydraulicBoundaryDatabaseImporter_Config_sqlite_Not_found);
+ throw new CriticalFileReadException(message);
+ }
}
private bool IsImportRequired(HydraulicBoundaryDatabase hydraulicBoundaryDatabase)
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs
===================================================================
diff -u -r7e24cbef3a5a475fef4442be00ced9e5305e0b24 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7e24cbef3a5a475fef4442be00ced9e5305e0b24)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -528,6 +528,15 @@
}
///
+ /// Looks up a localized string similar to Het bijbehorende rekeninstellingen bestand is niet gevonden in dezelfde map als het HRD bestand..
+ ///
+ public static string HydraulicBoundaryDatabaseImporter_Config_sqlite_Not_found {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_Config_sqlite_Not_found", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to {0} Het bestand wordt overgeslagen..
///
public static string HydraulicBoundaryDatabaseImporter_ErrorMessage_0_file_skipped {
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx
===================================================================
diff -u -r7e24cbef3a5a475fef4442be00ced9e5305e0b24 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 7e24cbef3a5a475fef4442be00ced9e5305e0b24)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -488,4 +488,7 @@
Klik op details voor meer informatie.
{0}
+
+ Het bijbehorende rekeninstellingen bestand is niet gevonden in dezelfde map als het HRD bestand.
+
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs
===================================================================
diff -u -r02d0e67121f748ae6d69ab9f68643d2f5e62f800 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 02d0e67121f748ae6d69ab9f68643d2f5e62f800)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -179,7 +179,7 @@
{
ActivityProgressDialogRunner.Run(Gui.MainWindow, calculations.Select(
calc => new GrassCoverErosionInwardsCalculationActivity(calc,
- Path.GetDirectoryName(assessmentSection.HydraulicBoundaryDatabase.FilePath),
+ assessmentSection.HydraulicBoundaryDatabase.FilePath,
failureMechanism,
assessmentSection)).ToArray());
}
@@ -626,7 +626,7 @@
private void Calculate(GrassCoverErosionInwardsCalculation calculation, GrassCoverErosionInwardsCalculationContext context)
{
ActivityProgressDialogRunner.Run(Gui.MainWindow, new GrassCoverErosionInwardsCalculationActivity(calculation,
- Path.GetDirectoryName(context.AssessmentSection.HydraulicBoundaryDatabase.FilePath),
+ context.AssessmentSection.HydraulicBoundaryDatabase.FilePath,
context.FailureMechanism,
context.AssessmentSection));
}
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs
===================================================================
diff -u -r16cb360eae0014270ebb6700054afdbbd565ae65 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision 16cb360eae0014270ebb6700054afdbbd565ae65)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -36,7 +36,7 @@
public class GrassCoverErosionInwardsCalculationActivity : HydraRingActivityBase
{
private readonly GrassCoverErosionInwardsCalculation calculation;
- private readonly string hlcdDirectory;
+ private readonly string hydraulicBoundaryDatabaseFilePath;
private readonly GrassCoverErosionInwardsFailureMechanism failureMechanism;
private readonly IAssessmentSection assessmentSection;
private readonly GrassCoverErosionInwardsCalculationService calculationService;
@@ -45,20 +45,20 @@
/// Creates a new instance of .
///
/// The height structures data used for the calculation.
- /// The directory of the HLCD file that should be used for performing 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 hlcdDirectory,
+ public GrassCoverErosionInwardsCalculationActivity(GrassCoverErosionInwardsCalculation calculation, string hydraulicBoundaryDatabaseFilePath,
GrassCoverErosionInwardsFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
{
if (calculation == null)
{
throw new ArgumentNullException("calculation");
}
- if (hlcdDirectory == null)
+ if (hydraulicBoundaryDatabaseFilePath == null)
{
- throw new ArgumentNullException("hlcdDirectory");
+ throw new ArgumentNullException("hydraulicBoundaryDatabaseFilePath");
}
if (failureMechanism == null)
{
@@ -70,7 +70,7 @@
}
this.calculation = calculation;
- this.hlcdDirectory = hlcdDirectory;
+ this.hydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath;
this.failureMechanism = failureMechanism;
this.assessmentSection = assessmentSection;
@@ -100,7 +100,7 @@
failureMechanismSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- hlcdDirectory);
+ hydraulicBoundaryDatabaseFilePath);
}
protected override void OnCancel()
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs
===================================================================
diff -u -r42d52d35081f3f43067fd542813e1688cc78a454 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 42d52d35081f3f43067fd542813e1688cc78a454)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -20,6 +20,7 @@
// All rights reserved.
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using Core.Common.Base.IO;
using log4net;
@@ -98,14 +99,15 @@
/// The to create input with.
/// Calculation input parameters that apply to all instances.
/// The amount of contribution for this failure mechanism in the assessment section.
- /// The directory of the HLCD file that should be used for performing the calculation.
+ /// The path which points to the hydraulic boundary database file.
internal void Calculate(GrassCoverErosionInwardsCalculation calculation,
IAssessmentSection assessmentSection,
FailureMechanismSection failureMechanismSection,
GeneralGrassCoverErosionInwardsInput generalInput,
double failureMechanismContribution,
- string hlcdDirectory)
+ string hydraulicBoundaryDatabaseFilePath)
{
+ var hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath);
var calculateDikeHeight = calculation.InputParameters.CalculateDikeHeight;
var totalSteps = calculateDikeHeight ? 2 : 1;
var calculationName = calculation.Name;
@@ -115,7 +117,7 @@
CalculationServiceHelper.LogCalculationBeginTime(calculationName);
overtoppingCalculator = HydraRingCalculatorFactory.Instance.CreateOvertoppingCalculator(hlcdDirectory, assessmentSection.Id);
- var overtoppingCalculationInput = CreateOvertoppingInput(calculation, failureMechanismSection, generalInput);
+ var overtoppingCalculationInput = CreateOvertoppingInput(calculation, failureMechanismSection, generalInput, hydraulicBoundaryDatabaseFilePath);
double? dikeHeight = null;
try
@@ -127,7 +129,7 @@
NotifyProgress(Resources.GrassCoverErosionInwardsCalculationService_Calculate_Executing_dikeheight_calculation, 2, totalSteps);
dikeHeightCalculator = HydraRingCalculatorFactory.Instance.CreateDikeHeightCalculator(hlcdDirectory, assessmentSection.Id);
- var dikeHeightCalculationInput = CreateDikeHeightInput(calculation, assessmentSection, failureMechanismSection, generalInput);
+ var dikeHeightCalculationInput = CreateDikeHeightInput(calculation, assessmentSection, failureMechanismSection, generalInput, hydraulicBoundaryDatabaseFilePath);
CalculateDikeHeight(dikeHeightCalculationInput, calculationName);
dikeHeight = dikeHeightCalculator.DikeHeight;
}
@@ -245,49 +247,61 @@
private static OvertoppingCalculationInput CreateOvertoppingInput(GrassCoverErosionInwardsCalculation calculation,
FailureMechanismSection failureMechanismSection,
- GeneralGrassCoverErosionInwardsInput generalInput)
+ GeneralGrassCoverErosionInwardsInput generalInput,
+ string hydraulicBoundaryDatabaseFilePath)
{
- return new OvertoppingCalculationInput(calculation.InputParameters.HydraulicBoundaryLocation.Id,
- new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.Orientation),
- ParseProfilePoints(calculation.InputParameters.DikeGeometry),
- HydraRingInputParser.ParseForeshore(calculation.InputParameters),
- HydraRingInputParser.ParseBreakWater(calculation.InputParameters),
- calculation.InputParameters.DikeHeight,
- generalInput.CriticalOvertoppingModelFactor,
- generalInput.FbFactor.Mean,
- generalInput.FbFactor.StandardDeviation,
- generalInput.FnFactor.Mean,
- generalInput.FnFactor.StandardDeviation,
- generalInput.OvertoppingModelFactor,
- calculation.InputParameters.CriticalFlowRate.Mean,
- calculation.InputParameters.CriticalFlowRate.StandardDeviation,
- generalInput.FrunupModelFactor.Mean,
- generalInput.FrunupModelFactor.StandardDeviation,
- generalInput.FshallowModelFactor.Mean,
- generalInput.FshallowModelFactor.StandardDeviation);
+ var overtoppingCalculationInput = new OvertoppingCalculationInput(calculation.InputParameters.HydraulicBoundaryLocation.Id,
+ new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.Orientation),
+ ParseProfilePoints(calculation.InputParameters.DikeGeometry),
+ HydraRingInputParser.ParseForeshore(calculation.InputParameters),
+ HydraRingInputParser.ParseBreakWater(calculation.InputParameters),
+ calculation.InputParameters.DikeHeight,
+ generalInput.CriticalOvertoppingModelFactor,
+ generalInput.FbFactor.Mean,
+ generalInput.FbFactor.StandardDeviation,
+ generalInput.FnFactor.Mean,
+ generalInput.FnFactor.StandardDeviation,
+ generalInput.OvertoppingModelFactor,
+ calculation.InputParameters.CriticalFlowRate.Mean,
+ calculation.InputParameters.CriticalFlowRate.StandardDeviation,
+ generalInput.FrunupModelFactor.Mean,
+ generalInput.FrunupModelFactor.StandardDeviation,
+ generalInput.FshallowModelFactor.Mean,
+ generalInput.FshallowModelFactor.StandardDeviation);
+
+ HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(overtoppingCalculationInput, hydraulicBoundaryDatabaseFilePath);
+
+ return overtoppingCalculationInput;
}
- private static DikeHeightCalculationInput CreateDikeHeightInput(GrassCoverErosionInwardsCalculation calculation, IAssessmentSection assessmentSection,
- FailureMechanismSection failureMechanismSection, GeneralGrassCoverErosionInwardsInput generalInput)
+ private static DikeHeightCalculationInput CreateDikeHeightInput(GrassCoverErosionInwardsCalculation calculation,
+ IAssessmentSection assessmentSection,
+ FailureMechanismSection failureMechanismSection,
+ GeneralGrassCoverErosionInwardsInput generalInput,
+ string hydraulicBoundaryDatabaseFilePath)
{
- return new DikeHeightCalculationInput(calculation.InputParameters.HydraulicBoundaryLocation.Id,
- assessmentSection.FailureMechanismContribution.Norm,
- new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.Orientation),
- ParseProfilePoints(calculation.InputParameters.DikeGeometry),
- HydraRingInputParser.ParseForeshore(calculation.InputParameters),
- HydraRingInputParser.ParseBreakWater(calculation.InputParameters),
- generalInput.CriticalOvertoppingModelFactor,
- generalInput.FbFactor.Mean,
- generalInput.FbFactor.StandardDeviation,
- generalInput.FnFactor.Mean,
- generalInput.FnFactor.StandardDeviation,
- generalInput.OvertoppingModelFactor,
- calculation.InputParameters.CriticalFlowRate.Mean,
- calculation.InputParameters.CriticalFlowRate.StandardDeviation,
- generalInput.FrunupModelFactor.Mean,
- generalInput.FrunupModelFactor.StandardDeviation,
- generalInput.FshallowModelFactor.Mean,
- generalInput.FshallowModelFactor.StandardDeviation);
+ var dikeHeightCalculationInput = new DikeHeightCalculationInput(calculation.InputParameters.HydraulicBoundaryLocation.Id,
+ assessmentSection.FailureMechanismContribution.Norm,
+ new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.Orientation),
+ ParseProfilePoints(calculation.InputParameters.DikeGeometry),
+ HydraRingInputParser.ParseForeshore(calculation.InputParameters),
+ HydraRingInputParser.ParseBreakWater(calculation.InputParameters),
+ generalInput.CriticalOvertoppingModelFactor,
+ generalInput.FbFactor.Mean,
+ generalInput.FbFactor.StandardDeviation,
+ generalInput.FnFactor.Mean,
+ generalInput.FnFactor.StandardDeviation,
+ generalInput.OvertoppingModelFactor,
+ calculation.InputParameters.CriticalFlowRate.Mean,
+ calculation.InputParameters.CriticalFlowRate.StandardDeviation,
+ generalInput.FrunupModelFactor.Mean,
+ generalInput.FrunupModelFactor.StandardDeviation,
+ generalInput.FshallowModelFactor.Mean,
+ generalInput.FshallowModelFactor.StandardDeviation);
+
+ HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(dikeHeightCalculationInput, hydraulicBoundaryDatabaseFilePath);
+
+ return dikeHeightCalculationInput;
}
private static IEnumerable ParseProfilePoints(RoughnessPoint[] roughnessProfilePoints)
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs
===================================================================
diff -u -r7ad50171865839ec26c5356aaacc24606faf75a7 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs (.../GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs) (revision 7ad50171865839ec26c5356aaacc24606faf75a7)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs (.../GrassCoverErosionInwardsCalculationActivityIntegrationTest.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -45,7 +45,8 @@
[TestFixture]
public class GrassCoverErosionInwardsCalculationActivityIntegrationTest
{
- private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation");
+ private static readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation");
+ private static readonly string validFile = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
[Test]
public void Run_InvalidGrassCoverErosionInwardsCalculationInvalidHydraulicBoundaryDatabase_LogValidationStartAndEndWithError()
@@ -102,7 +103,7 @@
}
};
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -147,7 +148,7 @@
calculation.Attach(observerMock);
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -204,7 +205,7 @@
calculation.Attach(observerMock);
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -250,7 +251,7 @@
}
};
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -279,7 +280,7 @@
}
};
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -311,7 +312,7 @@
}
};
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -348,7 +349,7 @@
calculation.Attach(observerMock);
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -392,7 +393,7 @@
calculation.Attach(observerMock);
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -435,7 +436,7 @@
calculation.Attach(observerMock);
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
@@ -485,7 +486,7 @@
calculation.Attach(observerMock);
- var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, testDataPath, assessmentSection.GrassCoverErosionInwards, assessmentSection);
+ var activity = new GrassCoverErosionInwardsCalculationActivity(calculation, validFile, assessmentSection.GrassCoverErosionInwards, assessmentSection);
using (new HydraRingCalculatorFactoryConfig())
{
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationActivityTest.cs
===================================================================
diff -u -r1b0460d5f81926d0366ab10e4b0e9f6d75809c71 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationActivityTest.cs (.../GrassCoverErosionInwardsCalculationActivityTest.cs) (revision 1b0460d5f81926d0366ab10e4b0e9f6d75809c71)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationActivityTest.cs (.../GrassCoverErosionInwardsCalculationActivityTest.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -75,7 +75,7 @@
}
[Test]
- public void ParameteredConstructor_HlcdDirectoryNull_ThrowsArgumentNullException()
+ public void ParameteredConstructor_HydraulicBoundaryDatabaseFilePathNull_ThrowsArgumentNullException()
{
// Setup
var mocks = new MockRepository();
@@ -90,7 +90,7 @@
// Assert
var exception = Assert.Throws(call);
- Assert.AreEqual("hlcdDirectory", exception.ParamName);
+ Assert.AreEqual("hydraulicBoundaryDatabaseFilePath", exception.ParamName);
mocks.VerifyAll();
}
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs
===================================================================
diff -u -r42d52d35081f3f43067fd542813e1688cc78a454 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 42d52d35081f3f43067fd542813e1688cc78a454)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -43,19 +43,18 @@
public class GrassCoverErosionInwardsCalculationServiceTest
{
private static readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation");
+ private static readonly string validFile = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
[Test]
public void Validate_NoHydraulicBoundaryLocation_LogsErrorAndReturnsFalse()
{
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
@@ -139,12 +138,10 @@
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
@@ -186,12 +183,10 @@
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
@@ -222,25 +217,23 @@
{
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
-
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
+
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
- GrassCoverErosionInwardsCalculation calculation = new GrassCoverErosionInwardsCalculation()
+ GrassCoverErosionInwardsCalculation calculation = new GrassCoverErosionInwardsCalculation
{
Name = name,
InputParameters =
{
HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "name", 2, 2),
DikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0],
- null, new DikeProfile.ConstructionProperties()
+ null, new DikeProfile.ConstructionProperties
{
Orientation = RoundedDouble.NaN
})
@@ -276,12 +269,10 @@
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
@@ -312,12 +303,10 @@
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
@@ -358,13 +347,11 @@
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(grassCoverErosionInwardsFailureMechanism);
-
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
+
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -390,7 +377,7 @@
failureMechanismSection,
grassCoverErosionInwardsFailureMechanism.GeneralInput,
grassCoverErosionInwardsFailureMechanism.Contribution,
- testDataPath);
+ validFile);
}
// Assert
@@ -414,13 +401,11 @@
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(grassCoverErosionInwardsFailureMechanism);
-
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
+
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -453,7 +438,7 @@
failureMechanismSection,
grassCoverErosionInwardsFailureMechanism.GeneralInput,
grassCoverErosionInwardsFailureMechanism.Contribution,
- testDataPath);
+ validFile);
}
}
catch (HydraRingFileParserException)
@@ -485,13 +470,11 @@
// Setup
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(grassCoverErosionInwardsFailureMechanism);
-
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
+
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -501,7 +484,7 @@
InputParameters =
{
HydraulicBoundaryLocation = assessmentSectionStub.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001),
- DikeProfile = dikeProfile,
+ DikeProfile = dikeProfile
}
};
@@ -523,7 +506,7 @@
failureMechanismSection,
grassCoverErosionInwardsFailureMechanism.GeneralInput,
grassCoverErosionInwardsFailureMechanism.Contribution,
- testDataPath);
+ validFile);
}
}
catch (HydraRingFileParserException)
@@ -555,12 +538,10 @@
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(grassCoverErosionInwardsFailureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
@@ -572,7 +553,7 @@
{
HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "name", 2, 2),
DikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0],
- null, new DikeProfile.ConstructionProperties()),
+ null, new DikeProfile.ConstructionProperties())
}
};
@@ -590,7 +571,7 @@
failureMechanismSection,
grassCoverErosionInwardsFailureMechanism.GeneralInput,
grassCoverErosionInwardsFailureMechanism.Contribution,
- testDataPath);
+ validFile);
// Assert
Assert.IsTrue(calculator.IsCanceled);
@@ -607,12 +588,10 @@
var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(grassCoverErosionInwardsFailureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
const string name = "";
@@ -654,7 +633,7 @@
failureMechanismSection,
grassCoverErosionInwardsFailureMechanism.GeneralInput,
grassCoverErosionInwardsFailureMechanism.Contribution,
- testDataPath);
+ validFile);
// Assert
Assert.IsNull(calculation.Output);
@@ -681,12 +660,10 @@
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(failureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -721,7 +698,7 @@
failureMechanismSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- testDataPath);
+ validFile);
}
catch (HydraRingFileParserException)
{
@@ -750,12 +727,10 @@
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(failureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -789,7 +764,7 @@
failureMechanismSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- testDataPath);
+ validFile);
}
catch (HydraRingFileParserException)
{
@@ -818,12 +793,10 @@
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(failureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -859,7 +832,7 @@
failureMechanismSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- testDataPath);
+ validFile);
}
catch (HydraRingFileParserException e)
{
@@ -890,12 +863,10 @@
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(failureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -930,7 +901,7 @@
failureMechanismSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- testDataPath);
+ validFile);
}
catch (HydraRingFileParserException)
{
@@ -960,12 +931,10 @@
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(failureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -999,7 +968,7 @@
failureMechanismSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- testDataPath);
+ validFile);
}
catch (HydraRingFileParserException)
{
@@ -1029,12 +998,10 @@
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
AddSectionToFailureMechanism(failureMechanism);
- var filePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite");
-
var mockRepository = new MockRepository();
IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism,
mockRepository,
- filePath);
+ validFile);
mockRepository.ReplayAll();
var dikeProfile = GetDikeProfile();
@@ -1069,7 +1036,7 @@
failureMechanismSection,
failureMechanism.GeneralInput,
failureMechanism.Contribution,
- testDataPath);
+ validFile);
}
catch (HydraRingFileParserException e)
{
@@ -1134,7 +1101,7 @@
new RoughnessPoint[0],
new Point2D[0],
new BreakWater(BreakWaterType.Dam, breakWaterHeight),
- new DikeProfile.ConstructionProperties()),
+ new DikeProfile.ConstructionProperties())
}
};
}
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs
===================================================================
diff -u -r3e7874d12200b0cbd1953cc6be56d887d86cbde7 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision 3e7874d12200b0cbd1953cc6be56d887d86cbde7)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -526,7 +526,7 @@
TestDelegate call = () => new GrassCoverErosionOutwardsWaveConditionsCalculationService().Calculate(calculation,
failureMechanism,
assessmentSectionStub,
- testDataPath);
+ validFilePath);
// Assert
Assert.Throws(call);
@@ -558,7 +558,7 @@
TestDelegate call = () => new GrassCoverErosionOutwardsWaveConditionsCalculationService().Calculate(calculation,
failureMechanism,
assessmentSectionStub,
- testDataPath);
+ validFilePath);
// Assert
Assert.Throws(call);
@@ -591,7 +591,7 @@
TestDelegate call = () => new GrassCoverErosionOutwardsWaveConditionsCalculationService().Calculate(calculation,
failureMechanism,
assessmentSectionStub,
- testDataPath);
+ validFilePath);
// Assert
var exception = Assert.Throws(call);
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/corruptschema.config.sqlite
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/test-data/HydraulicBoundaryDatabase/HRD dutch coast south.config.sqlite
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/test-data/HydraulicBoundaryDatabase/empty.config.sqlite
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/test-data/completeWithLocationsToBeFilteredOut.config.sqlite
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/test-data/copyOfCompleteWithLocationsToBeFilteredOut.config.sqlite
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/IntegrationTestHelper.cs
===================================================================
diff -u -rf27092df1f897798c4a0b24f6fc91f49c9f294ce -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/IntegrationTestHelper.cs (.../IntegrationTestHelper.cs) (revision f27092df1f897798c4a0b24f6fc91f49c9f294ce)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/IntegrationTestHelper.cs (.../IntegrationTestHelper.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -89,7 +89,8 @@
using (var embeddedResourceFileWriter = new EmbeddedResourceFileWriter(typeof(IntegrationTestHelper).Assembly,
false,
"HRD dutch coast south.sqlite",
- "HLCD.sqlite"))
+ "HLCD.sqlite",
+ "HRD dutch coast south.config.sqlite"))
using (var hydraulicBoundaryDatabaseImporter = new HydraulicBoundaryDatabaseImporter())
{
var filePath = Path.Combine(embeddedResourceFileWriter.TargetFolderPath, "HRD dutch coast south.sqlite");
Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/Resources/HRD dutch coast south.config.sqlite
===================================================================
diff -u
Binary files differ
Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/Ringtoets.Piping.Integration.Test.csproj
===================================================================
diff -u -rb1b25abeb595bff11389bbf0e695851995ef5221 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/Ringtoets.Piping.Integration.Test.csproj (.../Ringtoets.Piping.Integration.Test.csproj) (revision b1b25abeb595bff11389bbf0e695851995ef5221)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/Ringtoets.Piping.Integration.Test.csproj (.../Ringtoets.Piping.Integration.Test.csproj) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -163,6 +163,7 @@
+
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs
===================================================================
diff -u -r02d0e67121f748ae6d69ab9f68643d2f5e62f800 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision 02d0e67121f748ae6d69ab9f68643d2f5e62f800)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -111,7 +111,7 @@
/// The 'c' factor decided on failure mechanism level.
/// The norm to use as the target.
/// The id of the assessment section for which calculations are performed.
- /// The filepath of the hydraulic boundary database.
+ /// The filepath of the hydraulic boundary database.
/// An of .
protected IEnumerable CalculateWaveConditions(string calculationName,
WaveConditionsInput waveConditionsInput,
@@ -120,7 +120,7 @@
RoundedDouble c,
double norm,
string ringId,
- string hlcdFilePath)
+ string hrdFilePath)
{
var outputs = new List();
@@ -139,7 +139,7 @@
c,
norm,
waveConditionsInput,
- Path.GetDirectoryName(hlcdFilePath),
+ hrdFilePath,
ringId,
calculationName);
@@ -196,7 +196,7 @@
/// The 'c' factor decided on failure mechanism level.
/// The norm to use as the target.
/// The input that is different per calculation.
- /// The directory of the hydraulic boundary database.
+ /// The path which points to the hydraulic boundary database file.
/// The id of the assessment section for which calculations are performed.
/// The name used for logging.
/// A if the calculation was succesful; or null if it was canceled.
@@ -206,12 +206,13 @@
RoundedDouble c,
double norm,
WaveConditionsInput input,
- string hlcdDirectory,
+ string hydraulicBoundaryDatabaseFilePath,
string ringId,
string name)
{
+ string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath);
calculator = HydraRingCalculatorFactory.Instance.CreateWaveConditionsCosineCalculator(hlcdDirectory, ringId);
- WaveConditionsCosineCalculationInput calculationInput = CreateInput(waterLevel, a, b, c, norm, input);
+ WaveConditionsCosineCalculationInput calculationInput = CreateInput(waterLevel, a, b, c, norm, input, hydraulicBoundaryDatabaseFilePath);
var exceptionThrown = false;
try
@@ -277,18 +278,24 @@
RoundedDouble b,
RoundedDouble c,
double norm,
- WaveConditionsInput input)
+ WaveConditionsInput input,
+ string hydraulicBoundaryDatabaseFilePath)
{
- return new WaveConditionsCosineCalculationInput(1,
- input.Orientation,
- input.HydraulicBoundaryLocation.Id,
- norm,
- HydraRingInputParser.ParseForeshore(input),
- HydraRingInputParser.ParseBreakWater(input),
- waterLevel,
- a,
- b,
- c);
+ var waveConditionsCosineCalculationInput = new WaveConditionsCosineCalculationInput(
+ 1,
+ input.Orientation,
+ input.HydraulicBoundaryLocation.Id,
+ norm,
+ HydraRingInputParser.ParseForeshore(input),
+ HydraRingInputParser.ParseBreakWater(input),
+ waterLevel,
+ a,
+ b,
+ c);
+
+ HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(waveConditionsCosineCalculationInput, hydraulicBoundaryDatabaseFilePath);
+
+ return waveConditionsCosineCalculationInput;
}
private static string ValidateWaveConditionsInput(WaveConditionsInput input, string designWaterLevelName)
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs
===================================================================
diff -u -rc238c8de03e71e09a71c68b6f28fb057ef8a1c4d -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs (.../WaveConditionsCalculationServiceBaseTest.cs) (revision c238c8de03e71e09a71c68b6f28fb057ef8a1c4d)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs (.../WaveConditionsCalculationServiceBaseTest.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -367,16 +367,16 @@
Orientation = (RoundedDouble) 0
};
- string hcldFilePath = "C:\\temp\\someFile";
+ string hcldFilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite");
string ringId = "11-1";
- string name = "test";
+ string calculationName = "test";
using (new HydraRingCalculatorFactoryConfig())
{
var testCalculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).WaveConditionsCosineCalculator;
// Call
- new WaveConditionsCalculationService().PublicCalculate(a, b, c, norm, input, hcldFilePath, ringId, name);
+ new WaveConditionsCalculationService().PublicCalculate(a, b, c, norm, input, hcldFilePath, ringId, calculationName);
// Assert
Assert.AreEqual(Path.GetDirectoryName(hcldFilePath), testCalculator.HydraulicBoundaryDatabaseDirectory);
@@ -440,9 +440,10 @@
LowerBoundaryRevetment = (RoundedDouble) 3
};
- string hlcdDirectory = "C:/temp";
- string ringId = "11-1";
- string name = "test";
+ const string ringId = "11-1";
+ const string calculationName = "test";
+
+ string hcldFilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite");
bool exceptionThrown = false;
using (new HydraRingCalculatorFactoryConfig())
@@ -455,7 +456,7 @@
{
try
{
- new WaveConditionsCalculationService().PublicCalculate(a, b, c, norm, input, hlcdDirectory, ringId, name);
+ new WaveConditionsCalculationService().PublicCalculate(a, b, c, norm, input, hcldFilePath, ringId, calculationName);
}
catch (HydraRingFileParserException)
{
@@ -468,8 +469,8 @@
{
var msgs = messages.ToArray();
Assert.AreEqual(3, msgs.Length);
- Assert.AreEqual(string.Format("Berekening '{0}' voor waterstand '{1}' gestart.", name, waterLevel), msgs[0]);
- Assert.AreEqual(string.Format("Berekening '{0}' voor waterstand '{1}' is niet gelukt. Er is geen foutrapport beschikbaar.", name, waterLevel), msgs[1]);
+ Assert.AreEqual(string.Format("Berekening '{0}' voor waterstand '{1}' gestart.", calculationName, waterLevel), msgs[0]);
+ Assert.AreEqual(string.Format("Berekening '{0}' voor waterstand '{1}' is niet gelukt. Er is geen foutrapport beschikbaar.", calculationName, waterLevel), msgs[1]);
StringAssert.StartsWith("Golfcondities berekening is uitgevoerd op de tijdelijke locatie:", msgs[2]);
});
Assert.IsTrue(exceptionThrown);
@@ -496,18 +497,19 @@
LowerBoundaryRevetment = (RoundedDouble) 3
};
- string hlcdDirectory = "C:/temp";
- string ringId = "11-1";
- string name = "test";
+ const string ringId = "11-1";
+ const string name = "test";
+ string hcldFilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite");
+
using (new HydraRingCalculatorFactoryConfig())
{
var testCalculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).WaveConditionsCosineCalculator;
var service = new WaveConditionsCalculationService();
testCalculator.CalculationFinishedHandler += (s, e) => service.Cancel();
// Call
- service.PublicCalculate(a, b, c, norm, input, hlcdDirectory, ringId, name);
+ service.PublicCalculate(a, b, c, norm, input, hcldFilePath, ringId, name);
// Assert
Assert.IsTrue(testCalculator.IsCanceled);
Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs
===================================================================
diff -u -r3e7874d12200b0cbd1953cc6be56d887d86cbde7 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs (.../StabilityStoneCoverWaveConditionsCalculationServiceTest.cs) (revision 3e7874d12200b0cbd1953cc6be56d887d86cbde7)
+++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs (.../StabilityStoneCoverWaveConditionsCalculationServiceTest.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -570,7 +570,7 @@
TestDelegate call = () => new StabilityStoneCoverWaveConditionsCalculationService().Calculate(calculation,
assessmentSectionStub,
failureMechanism.GeneralInput,
- testDataPath);
+ validFilePath);
// Assert
Assert.Throws(call);
@@ -602,7 +602,7 @@
TestDelegate call = () => new StabilityStoneCoverWaveConditionsCalculationService().Calculate(calculation,
assessmentSectionStub,
failureMechanism.GeneralInput,
- testDataPath);
+ validFilePath);
// Assert
Assert.Throws(call);
@@ -635,7 +635,7 @@
TestDelegate call = () => new StabilityStoneCoverWaveConditionsCalculationService().Calculate(calculation,
assessmentSectionStub,
failureMechanism.GeneralInput,
- testDataPath);
+ validFilePath);
// Assert
var exception = Assert.Throws(call);
Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs
===================================================================
diff -u -r3e7874d12200b0cbd1953cc6be56d887d86cbde7 -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699
--- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs) (revision 3e7874d12200b0cbd1953cc6be56d887d86cbde7)
+++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs) (revision 25d6b191a8ffd5dce434ddd07650aa1b9a76e699)
@@ -508,7 +508,7 @@
TestDelegate call = () => new WaveImpactAsphaltCoverWaveConditionsCalculationService().Calculate(calculation,
assessmentSectionStub,
failureMechanism.GeneralInput,
- testDataPath);
+ validFilePath);
// Assert
Assert.Throws(call);
@@ -540,7 +540,7 @@
TestDelegate call = () => new WaveImpactAsphaltCoverWaveConditionsCalculationService().Calculate(calculation,
assessmentSectionStub,
failureMechanism.GeneralInput,
- testDataPath);
+ validFilePath);
// Assert
Assert.Throws(call);
@@ -573,7 +573,7 @@
TestDelegate call = () => new WaveImpactAsphaltCoverWaveConditionsCalculationService().Calculate(calculation,
assessmentSectionStub,
failureMechanism.GeneralInput,
- testDataPath);
+ validFilePath);
// Assert
var exception = Assert.Throws(call);