Index: Riskeer/Integration/src/Riskeer.Integration.IO/Helpers/HydraulicBoundaryLocationCalculationsExportHelper.cs =================================================================== diff -u -r272cfc214b19eee23c9d875bc000a2b7a9a1a78e -rf15bd0f2220e15da0f793ffd112ec10edb66508f --- Riskeer/Integration/src/Riskeer.Integration.IO/Helpers/HydraulicBoundaryLocationCalculationsExportHelper.cs (.../HydraulicBoundaryLocationCalculationsExportHelper.cs) (revision 272cfc214b19eee23c9d875bc000a2b7a9a1a78e) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Helpers/HydraulicBoundaryLocationCalculationsExportHelper.cs (.../HydraulicBoundaryLocationCalculationsExportHelper.cs) (revision f15bd0f2220e15da0f793ffd112ec10edb66508f) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Globalization; using System.IO; using System.Linq; using Core.Common.Util; @@ -86,9 +87,10 @@ ? Resources.WaterLevels_DisplayName : Resources.WaveHeights_DisplayName; - string uniqueName = NamingHelper.GetUniqueName( - exportedCalculationFileNames, $"{exportType}_{ReturnPeriodFormattingHelper.FormatFromProbability(targetProbability)}", - c => c); + string returnPeriod = ReturnPeriodFormattingHelper.FormatFromProbability(targetProbability) + .ToString(CultureInfo.InvariantCulture) + .Replace(".", ""); + string uniqueName = NamingHelper.GetUniqueName(exportedCalculationFileNames, $"{exportType}_{returnPeriod}", c => c); exportedCalculationFileNames.Add(uniqueName); string tempFilePath = Path.Combine(folderPath, $"{uniqueName}.{RiskeerCommonIOResources.Shape_file_filter_Extension}"); Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/HydraulicBoundaryLocationCalculationsExporterTest.cs =================================================================== diff -u -rf9aee5d4feb96880cc68b34823f34c78ed0d2252 -rf15bd0f2220e15da0f793ffd112ec10edb66508f --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/HydraulicBoundaryLocationCalculationsExporterTest.cs (.../HydraulicBoundaryLocationCalculationsExporterTest.cs) (revision f9aee5d4feb96880cc68b34823f34c78ed0d2252) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/HydraulicBoundaryLocationCalculationsExporterTest.cs (.../HydraulicBoundaryLocationCalculationsExporterTest.cs) (revision f15bd0f2220e15da0f793ffd112ec10edb66508f) @@ -142,7 +142,7 @@ void Call() => isExported = exporter.Export(); // Assert - string expectedFilePath = Path.Combine(directoryPath, "~temp", "Waterstanden bij norm", "Waterstanden_30.000.shp"); + string expectedFilePath = Path.Combine(directoryPath, "~temp", "Waterstanden bij norm", "Waterstanden_30000.shp"); string expectedMessage = $"Er is een onverwachte fout opgetreden tijdens het schrijven van het bestand '{expectedFilePath}'. " + "Er zijn geen hydraulische belastingenlocaties geƫxporteerd."; TestHelper.AssertLogMessageIsGenerated(Call, expectedMessage); @@ -164,12 +164,12 @@ }); yield return new TestCaseData(assessmentSectionWithTargetProbabilities,new[] { - "Waterstanden bij norm/Waterstanden_30.000.shp", - "Waterstanden bij norm/Waterstanden_30.000 (1).shp", - "Waterstanden bij doelkans/Waterstanden_10.000.shp", - "Waterstanden bij doelkans/Waterstanden_100.000.shp", - "Golfhoogten bij doelkans/Golfhoogten_4.000.shp", - "Golfhoogten bij doelkans/Golfhoogten_40.000.shp" + "Waterstanden bij norm/Waterstanden_30000.shp", + "Waterstanden bij norm/Waterstanden_30000 (1).shp", + "Waterstanden bij doelkans/Waterstanden_10000.shp", + "Waterstanden bij doelkans/Waterstanden_100000.shp", + "Golfhoogten bij doelkans/Golfhoogten_4000.shp", + "Golfhoogten bij doelkans/Golfhoogten_40000.shp" }).SetName("With UserDefinedTargetProbabilities"); var assessmentSectionWithoutTargetProbabilities = new AssessmentSectionStub(); @@ -181,8 +181,8 @@ assessmentSectionWithoutTargetProbabilities.WaveHeightCalculationsForUserDefinedTargetProbabilities.Clear(); yield return new TestCaseData(assessmentSectionWithoutTargetProbabilities, new[] { - "Waterstanden bij norm/Waterstanden_30.000.shp", - "Waterstanden bij norm/Waterstanden_30.000 (1).shp" + "Waterstanden bij norm/Waterstanden_30000.shp", + "Waterstanden bij norm/Waterstanden_30000 (1).shp" }).SetName("Without UserDefinedTargetProbabilities"); } } Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Helpers/HydraulicBoundaryLocationCalculationsExportHelperTest.cs =================================================================== diff -u -rea0b3fd3a34414e19e5a775a84179e54a60c7058 -rf15bd0f2220e15da0f793ffd112ec10edb66508f --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Helpers/HydraulicBoundaryLocationCalculationsExportHelperTest.cs (.../HydraulicBoundaryLocationCalculationsExportHelperTest.cs) (revision ea0b3fd3a34414e19e5a775a84179e54a60c7058) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Helpers/HydraulicBoundaryLocationCalculationsExportHelperTest.cs (.../HydraulicBoundaryLocationCalculationsExportHelperTest.cs) (revision f15bd0f2220e15da0f793ffd112ec10edb66508f) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Globalization; using System.IO; using System.Linq; using System.Security.AccessControl; @@ -130,7 +131,7 @@ public void ExportLocationCalculationsForTargetProbabilities_DuplicateTargetProbability_ReturnsTrueAndWritesExpectedFiles(HydraulicBoundaryLocationCalculationsType calculationsType) { // Setup - const double targetProbability = 0.05; + const double targetProbability = 0.00005; string directoryPath = TestHelper.GetScratchPadPath(nameof(ExportLocationCalculationsForTargetProbabilities_DuplicateTargetProbability_ReturnsTrueAndWritesExpectedFiles)); Directory.CreateDirectory(directoryPath); @@ -213,7 +214,10 @@ ? "Waterstanden" : "Golfhoogten"; - return $"{exportType}_{ReturnPeriodFormattingHelper.FormatFromProbability(targetProbability)}"; + string returnPeriod = ReturnPeriodFormattingHelper.FormatFromProbability(targetProbability) + .ToString(CultureInfo.CurrentCulture) + .Replace(".", ""); + return $"{exportType}_{returnPeriod}"; } } } \ No newline at end of file