Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingConfigurationImporterTest.cs =================================================================== diff -u -rda6c157314d3df1c278d58cc444c7754a79dc656 -r3a89f5d8f3717906d784483ac2d74504c5ebe2f6 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingConfigurationImporterTest.cs (.../PipingConfigurationImporterTest.cs) (revision da6c157314d3df1c278d58cc444c7754a79dc656) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Importers/PipingConfigurationImporterTest.cs (.../PipingConfigurationImporterTest.cs) (revision 3a89f5d8f3717906d784483ac2d74504c5ebe2f6) @@ -52,6 +52,9 @@ yield return new TestCaseData("validConfigurationCalculationContainingNaNs.xml", GetExpectedNaNData()) .SetName("validConfigurationCalculationContainingNaNs"); + yield return new TestCaseData("validConfigurationCalculationContainingInfinities.xml", + GetExpectedInfinityData()) + .SetName("validConfigurationCalculationContainingInfinities"); } } @@ -113,7 +116,7 @@ // Assert string expectedMessage = $"Fout bij het lezen van bestand '{filePath}': bestandspad mag niet verwijzen naar een lege bestandsnaam. " + Environment.NewLine + - "Er is geen berekeningenconfiguratie geïmporteerd."; + "Er is geen berekeningenconfiguratie geïmporteerd."; TestHelper.AssertLogMessageIsGenerated(call, expectedMessage, 1); Assert.IsFalse(importSuccessful); } @@ -134,7 +137,7 @@ // Assert string expectedMessage = $"Fout bij het lezen van bestand '{filePath}': het bestand bestaat niet. " + Environment.NewLine + - "Er is geen berekeningenconfiguratie geïmporteerd."; + "Er is geen berekeningenconfiguratie geïmporteerd."; TestHelper.AssertLogMessageIsGenerated(call, expectedMessage, 1); Assert.IsFalse(importSuccessful); } @@ -705,6 +708,37 @@ }; } + private static CalculationGroup GetExpectedInfinityData() + { + return new CalculationGroup("Root", false) + { + Children = + { + new PipingCalculationScenario(new GeneralPipingInput()) + { + Name = "Calculation", + InputParameters = + { + UseAssessmentLevelManualInput = true, + AssessmentLevel = (RoundedDouble) double.NegativeInfinity, + EntryPointL = (RoundedDouble) double.NegativeInfinity, + ExitPointL = (RoundedDouble) double.PositiveInfinity, + PhreaticLevelExit = + { + Mean = (RoundedDouble) double.NegativeInfinity, + StandardDeviation = (RoundedDouble) double.PositiveInfinity + }, + DampingFactorExit = + { + Mean = (RoundedDouble) double.PositiveInfinity, + StandardDeviation = (RoundedDouble) double.PositiveInfinity + } + } + } + } + }; + } + private static void AssertCalculationGroup(CalculationGroup expectedCalculationGroup, CalculationGroup actualCalculationGroup) { Assert.AreEqual(expectedCalculationGroup.Children.Count, actualCalculationGroup.Children.Count);