Fisheye: Tag fd40e419b411422c5cdf99a35a00b09b856268d1 refers to a dead (removed) revision in file `Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationCalculationsExporter.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilitiesExporter.cs =================================================================== diff -u -rc45c5e9b2cf66499f4f175d2605826c4cdec5774 -rfd40e419b411422c5cdf99a35a00b09b856268d1 --- Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilitiesExporter.cs (.../HydraulicBoundaryLocationCalculationsForTargetProbabilitiesExporter.cs) (revision c45c5e9b2cf66499f4f175d2605826c4cdec5774) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilitiesExporter.cs (.../HydraulicBoundaryLocationCalculationsForTargetProbabilitiesExporter.cs) (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -135,7 +135,7 @@ string tempFilePath = Path.Combine(tempFolderPath, $"{uniqueName}.{RiskeerCommonIOResources.Shape_file_filter_Extension}"); - var exporter = new HydraulicBoundaryLocationCalculationsExporter( + var exporter = new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter( calculations, tempFilePath, calculationsType); if (!exporter.Export()) Index: Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter.cs =================================================================== diff -u --- Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter.cs (revision 0) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter.cs (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -0,0 +1,94 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Core.Common.Base.IO; +using Core.Common.IO.Exceptions; +using Core.Common.Util; +using log4net; +using Riskeer.Common.Data.Hydraulics; +using RiskeerCommonIOResources = Riskeer.Common.IO.Properties.Resources; + +namespace Riskeer.Integration.IO.Exporters +{ + /// + /// Exports hydraulic boundary location calculations for a single target probability and stores them as a shapefile. + /// + public class HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter : IFileExporter + { + private static readonly ILog log = LogManager.GetLogger(typeof(HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter)); + + private readonly IEnumerable calculations; + private readonly string filePath; + private readonly HydraulicBoundaryLocationCalculationsType calculationsType; + + /// + /// Creates a new instance of . + /// + /// The calculations to export. + /// The path of the file to export to. + /// The type of calculations. + /// Thrown when is null. + /// Thrown when is invalid. + /// Thrown when the + /// is an invalid value. + public HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter(IEnumerable calculations, + string filePath, HydraulicBoundaryLocationCalculationsType calculationsType) + { + if (calculations == null) + { + throw new ArgumentNullException(nameof(calculations)); + } + + IOUtils.ValidateFilePath(filePath); + + if (!Enum.IsDefined(typeof(HydraulicBoundaryLocationCalculationsType), calculationsType)) + { + throw new InvalidEnumArgumentException(nameof(calculationsType), + (int) calculationsType, + typeof(HydraulicBoundaryLocationCalculationsType)); + } + + this.calculations = calculations; + this.filePath = filePath; + this.calculationsType = calculationsType; + } + + public bool Export() + { + try + { + HydraulicBoundaryLocationCalculationsWriter.WriteHydraulicBoundaryLocationCalculations( + calculations, filePath, calculationsType); + } + catch (CriticalFileWriteException e) + { + log.ErrorFormat(RiskeerCommonIOResources.HydraulicBoundaryLocationsExporter_Error_Exception_0_no_HydraulicBoundaryLocations_exported, + e.Message); + return false; + } + + return true; + } + } +} \ No newline at end of file Index: Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsExporter.cs =================================================================== diff -u -rd4d2d3b67710d9e5f2ccedbebf38bcb29c354d77 -rfd40e419b411422c5cdf99a35a00b09b856268d1 --- Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsExporter.cs (.../HydraulicBoundaryLocationsExporter.cs) (revision d4d2d3b67710d9e5f2ccedbebf38bcb29c354d77) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsExporter.cs (.../HydraulicBoundaryLocationsExporter.cs) (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -161,7 +161,7 @@ string tempFilePath = Path.Combine(folderPath, $"{uniqueName}.{RiskeerCommonIOResources.Shape_file_filter_Extension}"); - var exporter = new HydraulicBoundaryLocationCalculationsExporter( + var exporter = new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter( calculations, tempFilePath, calculationsType); if (!exporter.Export()) Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs =================================================================== diff -u -r2ef1edacdfece1abbae778553622e1d1c849574c -rfd40e419b411422c5cdf99a35a00b09b856268d1 --- Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision 2ef1edacdfece1abbae778553622e1d1c849574c) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -762,7 +762,7 @@ { Name = context => $"{RiskeerIOResources.WaterLevels_DisplayName} ({ProbabilityFormattingHelper.Format(context.GetNormFunc())})", Extension = RiskeerCommonIOResources.Shape_file_filter_Extension, - CreateFileExporter = (context, filePath) => new HydraulicBoundaryLocationCalculationsExporter( + CreateFileExporter = (context, filePath) => new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter( context.WrappedData, filePath, HydraulicBoundaryLocationCalculationsType.WaterLevel), IsEnabled = context => true, GetExportPath = () => ExportHelper.GetFilePath(GetInquiryHelper(), new FileFilterGenerator(RiskeerCommonIOResources.Shape_file_filter_Extension, @@ -1223,7 +1223,7 @@ { Name = context => $"{displayName} ({ ProbabilityFormattingHelper.Format(context.WrappedData.TargetProbability)})", Extension = RiskeerCommonIOResources.Shape_file_filter_Extension, - CreateFileExporter = (context, filePath) => new HydraulicBoundaryLocationCalculationsExporter( + CreateFileExporter = (context, filePath) => new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter( context.WrappedData.HydraulicBoundaryLocationCalculations, filePath, calculationsType), IsEnabled = context => true, GetExportPath = () => ExportHelper.GetFilePath(GetInquiryHelper(), new FileFilterGenerator(RiskeerCommonIOResources.Shape_file_filter_Extension, Fisheye: Tag fd40e419b411422c5cdf99a35a00b09b856268d1 refers to a dead (removed) revision in file `Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/HydraulicBoundaryLocationCalculationsExporterTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporterTest.cs =================================================================== diff -u --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporterTest.cs (revision 0) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporterTest.cs (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -0,0 +1,170 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.ComponentModel; +using System.IO; +using System.Linq; +using System.Security.AccessControl; +using Core.Common.Base.IO; +using Core.Common.TestUtil; +using NUnit.Framework; +using Riskeer.Common.Data.Hydraulics; +using Riskeer.Common.IO.TestUtil; +using Riskeer.Integration.IO.Exporters; + +namespace Riskeer.Integration.IO.Test.Exporters +{ + [TestFixture] + public class HydraulicBoundaryLocationCalculationsForTargetProbabilityExporterTest + { + [Test] + public void Constructor_CalculationsNull_ThrowsArgumentNullException() + { + // Call + void Call() => new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter(null, string.Empty, HydraulicBoundaryLocationCalculationsType.WaterLevel); + + // Assert + var exception = Assert.Throws(Call); + Assert.AreEqual("calculations", exception.ParamName); + } + + [Test] + public void Constructor_FilePathNull_ThrowsArgumentException() + { + // Call + void Call() => new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter( + Enumerable.Empty(), null, HydraulicBoundaryLocationCalculationsType.WaterLevel); + + // Assert + Assert.Throws(Call); + } + + [Test] + public void Constructor_InvalidHydraulicBoundaryLocationCalculationsType_ThrowsInvalidEnumArgumentException() + { + // Setup + string filePath = TestHelper.GetScratchPadPath(Path.Combine("export", "test.shp")); + const HydraulicBoundaryLocationCalculationsType hydraulicBoundaryLocationCalculationsType = (HydraulicBoundaryLocationCalculationsType) 99; + + // Call + void Call() => new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter( + Enumerable.Empty(), filePath, hydraulicBoundaryLocationCalculationsType); + + // Assert + string expectedMessage = $"The value of argument 'calculationsType' ({hydraulicBoundaryLocationCalculationsType}) " + + $"is invalid for Enum type '{nameof(HydraulicBoundaryLocationCalculationsType)}'."; + var exception = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(Call, expectedMessage); + Assert.AreEqual("calculationsType", exception.ParamName); + } + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + string filePath = TestHelper.GetScratchPadPath(Path.Combine("export", "test.shp")); + + // Call + var exporter = new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter( + Enumerable.Empty(), filePath, HydraulicBoundaryLocationCalculationsType.WaterLevel); + + // Assert + Assert.IsInstanceOf(exporter); + } + + [Test] + [TestCase(HydraulicBoundaryLocationCalculationsType.WaterLevel, "ExpectedWaterLevelExport")] + [TestCase(HydraulicBoundaryLocationCalculationsType.WaveHeight, "ExpectedWaveHeightExport")] + public void Export_ValidData_ReturnsTrueAndWritesCorrectData(HydraulicBoundaryLocationCalculationsType calculationsType, + string expectedExportFileName) + { + // Setup + const string fileName = "test"; + + string directoryPath = TestHelper.GetScratchPadPath(nameof(Export_ValidData_ReturnsTrueAndWritesCorrectData)); + Directory.CreateDirectory(directoryPath); + string filePath = Path.Combine(directoryPath, $"{fileName}.shp"); + + var exporter = new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter(new[] + { + new HydraulicBoundaryLocationCalculation(new HydraulicBoundaryLocation(123, "aName", 1.1, 2.2)) + }, filePath, calculationsType); + + // Precondition + FileTestHelper.AssertEssentialShapefilesExist(directoryPath, fileName, false); + + try + { + // Call + bool isExported = exporter.Export(); + + // Assert + FileTestHelper.AssertEssentialShapefilesExist(directoryPath, fileName, true); + FileTestHelper.AssertEssentialShapefileMd5Hashes( + directoryPath, fileName, + Path.Combine(TestHelper.GetTestDataPath(TestDataPath.Riskeer.Integration.IO), + nameof(HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter)), + expectedExportFileName, 28, 8, 628); + Assert.IsTrue(isExported); + } + finally + { + Directory.Delete(directoryPath, true); + } + } + + [Test] + public void Export_InvalidDirectoryRights_LogErrorAndReturnFalse() + { + // Setup + const string fileName = "test"; + + string directoryPath = TestHelper.GetScratchPadPath(nameof(Export_InvalidDirectoryRights_LogErrorAndReturnFalse)); + Directory.CreateDirectory(directoryPath); + string filePath = Path.Combine(directoryPath, $"{fileName}.shp"); + + var exporter = new HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter(new[] + { + new HydraulicBoundaryLocationCalculation(new HydraulicBoundaryLocation(123, "aName", 1.1, 2.2)) + }, filePath, HydraulicBoundaryLocationCalculationsType.WaterLevel); + + try + { + using (new DirectoryPermissionsRevoker(directoryPath, FileSystemRights.Write)) + { + // Call + var isExported = true; + void Call() => isExported = exporter.Export(); + + // Assert + string expectedMessage = $"Er is een onverwachte fout opgetreden tijdens het schrijven van het bestand '{filePath}'. " + + "Er zijn geen hydraulische belastingenlocaties geëxporteerd."; + TestHelper.AssertLogMessageIsGenerated(Call, expectedMessage); + Assert.IsFalse(isExported); + } + } + finally + { + Directory.Delete(directoryPath, true); + } + } + } +} \ No newline at end of file Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsExporter/ExpectedWaterLevelExport.dbf =================================================================== diff -u -r129bee0491f9f29f4cd10662d812d1b541502129 -rfd40e419b411422c5cdf99a35a00b09b856268d1 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsExporter/ExpectedWaterLevelExport.shp =================================================================== diff -u -r129bee0491f9f29f4cd10662d812d1b541502129 -rfd40e419b411422c5cdf99a35a00b09b856268d1 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsExporter/ExpectedWaterLevelExport.shx =================================================================== diff -u -r129bee0491f9f29f4cd10662d812d1b541502129 -rfd40e419b411422c5cdf99a35a00b09b856268d1 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsExporter/ExpectedWaveHeightExport.dbf =================================================================== diff -u -r129bee0491f9f29f4cd10662d812d1b541502129 -rfd40e419b411422c5cdf99a35a00b09b856268d1 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsExporter/ExpectedWaveHeightExport.shp =================================================================== diff -u -r129bee0491f9f29f4cd10662d812d1b541502129 -rfd40e419b411422c5cdf99a35a00b09b856268d1 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsExporter/ExpectedWaveHeightExport.shx =================================================================== diff -u -r129bee0491f9f29f4cd10662d812d1b541502129 -rfd40e419b411422c5cdf99a35a00b09b856268d1 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter/ExpectedWaterLevelExport.dbf =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter/ExpectedWaterLevelExport.shp =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter/ExpectedWaterLevelExport.shx =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter/ExpectedWaveHeightExport.dbf =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter/ExpectedWaveHeightExport.shp =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryLocationCalculationsForTargetProbabilityExporter/ExpectedWaveHeightExport.shx =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaterLevelCalculationsForNormTargetProbabilityContextExportInfoTest.cs =================================================================== diff -u -rb98ca78eaa45c4d5dc6703ae97deb81349d7536a -rfd40e419b411422c5cdf99a35a00b09b856268d1 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaterLevelCalculationsForNormTargetProbabilityContextExportInfoTest.cs (.../WaterLevelCalculationsForNormTargetProbabilityContextExportInfoTest.cs) (revision b98ca78eaa45c4d5dc6703ae97deb81349d7536a) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaterLevelCalculationsForNormTargetProbabilityContextExportInfoTest.cs (.../WaterLevelCalculationsForNormTargetProbabilityContextExportInfoTest.cs) (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -103,7 +103,7 @@ IFileExporter fileExporter = info.CreateFileExporter(context, filePath); // Assert - Assert.IsInstanceOf(fileExporter); + Assert.IsInstanceOf(fileExporter); } mocks.VerifyAll(); Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaterLevelCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs =================================================================== diff -u -r4eea139ce2a04e1f095eb98c18e283311d94f7d4 -rfd40e419b411422c5cdf99a35a00b09b856268d1 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaterLevelCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs) (revision 4eea139ce2a04e1f095eb98c18e283311d94f7d4) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaterLevelCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs) (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -102,7 +102,7 @@ IFileExporter fileExporter = info.CreateFileExporter(context, filePath); // Assert - Assert.IsInstanceOf(fileExporter); + Assert.IsInstanceOf(fileExporter); } mocks.VerifyAll(); Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaveHeightCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs =================================================================== diff -u -r4eea139ce2a04e1f095eb98c18e283311d94f7d4 -rfd40e419b411422c5cdf99a35a00b09b856268d1 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaveHeightCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs) (revision 4eea139ce2a04e1f095eb98c18e283311d94f7d4) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ExportInfos/WaveHeightCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityContextExportInfoTest.cs) (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -102,7 +102,7 @@ IFileExporter fileExporter = info.CreateFileExporter(context, filePath); // Assert - Assert.IsInstanceOf(fileExporter); + Assert.IsInstanceOf(fileExporter); } mocks.VerifyAll(); Index: Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/RiskeerProjectTestHelper.cs =================================================================== diff -u -r18bb01b07c2dfc46946826e5093f18cc29fdd007 -rfd40e419b411422c5cdf99a35a00b09b856268d1 --- Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/RiskeerProjectTestHelper.cs (.../RiskeerProjectTestHelper.cs) (revision 18bb01b07c2dfc46946826e5093f18cc29fdd007) +++ Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/RiskeerProjectTestHelper.cs (.../RiskeerProjectTestHelper.cs) (revision fd40e419b411422c5cdf99a35a00b09b856268d1) @@ -114,7 +114,7 @@ { new HydraulicBoundaryLocationCalculationsForTargetProbability(random.NextDouble(0, 0.1)), new HydraulicBoundaryLocationCalculationsForTargetProbability(random.NextDouble(0, 0.1)), - new HydraulicBoundaryLocationCalculationsForTargetProbability(random.NextDouble(0, 0.1)), + new HydraulicBoundaryLocationCalculationsForTargetProbability(random.NextDouble(0, 0.1)) }); assessmentSection.WaveHeightCalculationsForUserDefinedTargetProbabilities.AddRange(new[]