Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs
===================================================================
diff -u -rb4b93f81c63d098edfd9e50ce1c94e37903e52f6 -ra9d45ffa9451666f8117d7ec083441e388d34349
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision b4b93f81c63d098edfd9e50ce1c94e37903e52f6)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision a9d45ffa9451666f8117d7ec083441e388d34349)
@@ -71,6 +71,7 @@
/// during the execution of the operation.
///
/// The input of the calculation.
+ /// The normative assessment level to use.
/// The file path of the hydraulic boundary
/// database file which to validate.
/// The preprocessor directory to validate.
@@ -79,6 +80,7 @@
/// Thrown when
/// or is null.
protected static bool ValidateWaveConditionsInput(WaveConditionsInput waveConditionsInput,
+ RoundedDouble normativeAssessmentLevel,
string hydraulicBoundaryDatabaseFilePath,
string preprocessorDirectory,
string designWaterLevelName)
@@ -87,14 +89,19 @@
{
throw new ArgumentNullException(nameof(waveConditionsInput));
}
+
if (designWaterLevelName == null)
{
throw new ArgumentNullException(nameof(designWaterLevelName));
}
CalculationServiceHelper.LogValidationBegin();
- string[] messages = ValidateInput(hydraulicBoundaryDatabaseFilePath, preprocessorDirectory, waveConditionsInput, designWaterLevelName);
+ string[] messages = ValidateInput(hydraulicBoundaryDatabaseFilePath,
+ preprocessorDirectory,
+ waveConditionsInput,
+ normativeAssessmentLevel,
+ designWaterLevelName);
CalculationServiceHelper.LogMessagesAsError(messages);
@@ -201,12 +208,13 @@
private static string[] ValidateInput(string hydraulicBoundaryDatabaseFilePath,
string preprocessorDirectory,
WaveConditionsInput input,
+ RoundedDouble normativeAssessmentLevel,
string designWaterLevelName)
{
var validationResults = new List();
string databaseFilePathValidationProblem = HydraulicBoundaryDatabaseHelper.ValidateFilesForCalculation(hydraulicBoundaryDatabaseFilePath,
- preprocessorDirectory);
+ preprocessorDirectory);
if (!string.IsNullOrEmpty(databaseFilePathValidationProblem))
{
validationResults.Add(databaseFilePathValidationProblem);
@@ -223,7 +231,7 @@
return validationResults.ToArray();
}
- validationResults.AddRange(ValidateWaveConditionsInput(input, designWaterLevelName));
+ validationResults.AddRange(ValidateWaveConditionsInput(input, normativeAssessmentLevel, designWaterLevelName));
return validationResults.ToArray();
}
@@ -309,6 +317,7 @@
exceptionThrown = true;
}
+
output = null;
}
finally
@@ -332,6 +341,7 @@
output = null;
}
}
+
return output;
}
@@ -383,7 +393,9 @@
return waveConditionsCosineCalculationInput;
}
- private static IEnumerable ValidateWaveConditionsInput(WaveConditionsInput input, string designWaterLevelName)
+ private static IEnumerable ValidateWaveConditionsInput(WaveConditionsInput input,
+ RoundedDouble normativeAssessmentLevel,
+ string designWaterLevelName)
{
var messages = new List();
@@ -399,7 +411,7 @@
}
else
{
- if (!input.GetWaterLevels(input.AssessmentLevel).Any())
+ if (!input.GetWaterLevels(normativeAssessmentLevel).Any())
{
messages.Add(Resources.WaveConditionsCalculationService_ValidateInput_No_derived_WaterLevels);
}