Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs
===================================================================
diff -u -r49d90fb457184cd520ada77ee07774405985abd5 -r73aa6b5e849110e5c7cb584cce2aeb36698e7eee
--- Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision 49d90fb457184cd520ada77ee07774405985abd5)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision 73aa6b5e849110e5c7cb584cce2aeb36698e7eee)
@@ -66,7 +66,7 @@
///
/// Performs a piping calculation based on the supplied and sets
- /// to the if the calculation was successful. Error and status information is logged during
+ /// based on the result if the calculation was successful. Error and status information is logged during
/// the execution of the operation.
///
/// The to base the input for the calculation upon.
@@ -100,16 +100,68 @@
{
List validationResult = new List();
- if (double.IsNaN(inputParameters.ThicknessAquiferLayer.Mean))
+ var isHydraulicBoundaryLocationMissing = inputParameters.HydraulicBoundaryLocation == null;
+ var isSoilProfileMissing = inputParameters.StochasticSoilProfile == null;
+ var isSurfaceLineMissing = inputParameters.SurfaceLine == null;
+ var isExitPointLMissing = double.IsNaN(inputParameters.ExitPointL);
+ var isEntryPointLMissing = double.IsNaN(inputParameters.EntryPointL);
+ var isExitPointLBeyondEntryPointL = inputParameters.ExitPointL > inputParameters.EntryPointL;
+
+ if (isHydraulicBoundaryLocationMissing)
{
- validationResult.Add(Resources.PipingCalculationService_ValidateInput_Cannot_determine_thickness_aquifer_layer);
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_No_HydraulicBoundaryLocation_selected);
}
- if (double.IsNaN(inputParameters.ThicknessCoverageLayer.Mean))
+ if (isSurfaceLineMissing)
{
- validationResult.Add(Resources.PipingCalculationService_ValidateInput_Cannot_determine_thickness_coverage_layer);
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_No_SurfaceLine_selected);
}
+ if (isSoilProfileMissing)
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_No_StochasticSoilProfile_selected);
+ }
+
+ if (isEntryPointLMissing)
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_No_value_for_EntryPointL);
+ }
+
+ if (isExitPointLMissing)
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_No_value_for_ExitPointL);
+ }
+
+ if (!isEntryPointLMissing && !isExitPointLMissing && !isExitPointLBeyondEntryPointL)
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_EntryPointL_greater_or_equal_to_ExitPointL);
+ }
+
+ if (!isHydraulicBoundaryLocationMissing)
+ {
+ if (double.IsNaN(inputParameters.AssessmentLevel))
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_Cannot_determine_AssessmentLevel);
+ }
+ if (double.IsNaN(inputParameters.PiezometricHeadExit))
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_Cannot_determine_PiezometricHeadExit);
+ }
+ }
+
+ if (!isSurfaceLineMissing && !isSoilProfileMissing && !isExitPointLMissing)
+ {
+ if (double.IsNaN(inputParameters.ThicknessAquiferLayer.Mean))
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_Cannot_determine_thickness_aquifer_layer);
+ }
+
+ if (double.IsNaN(inputParameters.ThicknessCoverageLayer.Mean))
+ {
+ validationResult.Add(Resources.PipingCalculationService_ValidateInput_Cannot_determine_thickness_coverage_layer);
+ }
+ }
+
return validationResult;
}
@@ -139,8 +191,7 @@
inputParameters.BeddingAngle,
inputParameters.ExitPointL,
inputParameters.SurfaceLine,
- inputParameters.StochasticSoilProfile.SoilProfile
- );
+ inputParameters.StochasticSoilProfile.SoilProfile);
}
}
}
\ No newline at end of file