Index: Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/AggregatedDuneLocationFactory.cs =================================================================== diff -u -r351bd4720aca1cd6f026d374a9639566f192c574 -ra6019d296a2fac1dd494be841eb68d94f47a10d0 --- Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/AggregatedDuneLocationFactory.cs (.../AggregatedDuneLocationFactory.cs) (revision 351bd4720aca1cd6f026d374a9639566f192c574) +++ Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/AggregatedDuneLocationFactory.cs (.../AggregatedDuneLocationFactory.cs) (revision a6019d296a2fac1dd494be841eb68d94f47a10d0) @@ -78,61 +78,6 @@ .ToArray(); } - /// - /// Creates the aggregated dune locations based on the locations and calculations - /// from the failure mechanism. - /// - /// The failure mechanism to get the locations and calculations from. - /// A collection of . - /// Thrown when is null. - public static IEnumerable CreateAggregatedDuneLocations(DuneErosionFailureMechanism failureMechanism) - { - if (failureMechanism == null) - { - throw new ArgumentNullException(nameof(failureMechanism)); - } - - Dictionary duneLocationCalculationsForMechanismSpecificFactorizedSignalingNormLookup = - failureMechanism.CalculationsForMechanismSpecificFactorizedSignalingNorm.ToDictionary(calc => calc.DuneLocation, - calc => calc); - - Dictionary duneLocationCalculationsForMechanismSpecificSignalingNormLookup = - failureMechanism.CalculationsForMechanismSpecificSignalingNorm.ToDictionary(calc => calc.DuneLocation, - calc => calc); - - Dictionary duneLocationCalculationsForMechanismSpecificLowerLimitNormLookup = - failureMechanism.CalculationsForMechanismSpecificLowerLimitNorm.ToDictionary(calc => calc.DuneLocation, - calc => calc); - - Dictionary duneLocationCalculationsForLowerLimitNormLookup = - failureMechanism.CalculationsForLowerLimitNorm.ToDictionary(calc => calc.DuneLocation, - calc => calc); - - Dictionary duneLocationCalculationsForFactorizedLowerLimitNormLookup = - failureMechanism.CalculationsForFactorizedLowerLimitNorm.ToDictionary(calc => calc.DuneLocation, - calc => calc); - - return failureMechanism.DuneLocations - .Select(location => new AggregatedDuneLocation( - location.Id, location.Name, location.Location, location.CoastalAreaId, location.Offset, location.D50, - GetWaterLevel(duneLocationCalculationsForMechanismSpecificFactorizedSignalingNormLookup[location]), - GetWaterLevel(duneLocationCalculationsForMechanismSpecificSignalingNormLookup[location]), - GetWaterLevel(duneLocationCalculationsForMechanismSpecificLowerLimitNormLookup[location]), - GetWaterLevel(duneLocationCalculationsForLowerLimitNormLookup[location]), - GetWaterLevel(duneLocationCalculationsForFactorizedLowerLimitNormLookup[location]), - GetWaveHeight(duneLocationCalculationsForMechanismSpecificFactorizedSignalingNormLookup[location]), - GetWaveHeight(duneLocationCalculationsForMechanismSpecificSignalingNormLookup[location]), - GetWaveHeight(duneLocationCalculationsForMechanismSpecificLowerLimitNormLookup[location]), - GetWaveHeight(duneLocationCalculationsForLowerLimitNormLookup[location]), - GetWaveHeight(duneLocationCalculationsForFactorizedLowerLimitNormLookup[location]), - GetWavePeriod(duneLocationCalculationsForMechanismSpecificFactorizedSignalingNormLookup[location]), - GetWavePeriod(duneLocationCalculationsForMechanismSpecificSignalingNormLookup[location]), - GetWavePeriod(duneLocationCalculationsForMechanismSpecificLowerLimitNormLookup[location]), - GetWavePeriod(duneLocationCalculationsForLowerLimitNormLookup[location]), - GetWavePeriod(duneLocationCalculationsForFactorizedLowerLimitNormLookup[location]))) - .ToArray(); - } - private static RoundedDouble GetWaterLevel(DuneLocationCalculation calculation) { return calculation.Output?.WaterLevel ?? RoundedDouble.NaN; Index: Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Views/AggregatedDuneLocation.cs =================================================================== diff -u -r9bded049d932924a8bed22d6758d24a0303e8ea0 -ra6019d296a2fac1dd494be841eb68d94f47a10d0 --- Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Views/AggregatedDuneLocation.cs (.../AggregatedDuneLocation.cs) (revision 9bded049d932924a8bed22d6758d24a0303e8ea0) +++ Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Views/AggregatedDuneLocation.cs (.../AggregatedDuneLocation.cs) (revision a6019d296a2fac1dd494be841eb68d94f47a10d0) @@ -40,97 +40,6 @@ /// The coastal area id of the dune location. /// The offset of the dune location. /// The d50 of the dune location. - /// The result of the water level calculation - /// for the mechanism specific factorized signaling norm. - /// The result of the water level calculation - /// for the mechanism specific signaling norm. - /// The result of the water level calculation - /// for the mechanism specific lower limit norm. - /// The result of the water level calculation - /// for the lower limit norm. - /// The result of the water level calculation - /// for the factorized lower limit norm. - /// The result of the wave height calculation - /// for the mechanism specific factorized signaling norm. - /// The result of the wave height calculation - /// for the mechanism specific signaling norm. - /// The result of the wave height calculation - /// for the mechanism specific lower limit norm. - /// The result of the wave height calculation - /// for the lower limit norm. - /// The result of the wave height calculation - /// for the factorized lower limit norm. - /// The result of the wave period calculation - /// for the mechanism specific factorized signaling norm. - /// The result of the wave period calculation - /// for the mechanism specific signaling norm. - /// The result of the wave period calculation - /// for the mechanism specific lower limit norm. - /// The result of the wave period calculation - /// for the lower limit norm. - /// The result of the wave period calculation - /// for the factorized lower limit norm. - /// Thrown when or - /// is null. - public AggregatedDuneLocation(long id, string name, Point2D location, int coastalAreaId, RoundedDouble offset, RoundedDouble d50, - RoundedDouble waterLevelForMechanismSpecificFactorizedSignalingNorm, - RoundedDouble waterLevelForMechanismSpecificSignalingNorm, - RoundedDouble waterLevelForMechanismSpecificLowerLimitNorm, - RoundedDouble waterLevelForLowerLimitNorm, - RoundedDouble waterLevelForFactorizedLowerLimitNorm, - RoundedDouble waveHeightForMechanismSpecificFactorizedSignalingNorm, - RoundedDouble waveHeightForMechanismSpecificSignalingNorm, - RoundedDouble waveHeightForMechanismSpecificLowerLimitNorm, - RoundedDouble waveHeightForLowerLimitNorm, - RoundedDouble waveHeightForFactorizedLowerLimitNorm, - RoundedDouble wavePeriodForMechanismSpecificFactorizedSignalingNorm, - RoundedDouble wavePeriodForMechanismSpecificSignalingNorm, - RoundedDouble wavePeriodForMechanismSpecificLowerLimitNorm, - RoundedDouble wavePeriodForLowerLimitNorm, - RoundedDouble wavePeriodForFactorizedLowerLimitNorm) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - - if (location == null) - { - throw new ArgumentNullException(nameof(location)); - } - - Id = id; - Name = name; - Location = location; - CoastalAreaId = coastalAreaId; - Offset = offset; - D50 = d50; - WaterLevelForMechanismSpecificFactorizedSignalingNorm = waterLevelForMechanismSpecificFactorizedSignalingNorm; - WaterLevelForMechanismSpecificSignalingNorm = waterLevelForMechanismSpecificSignalingNorm; - WaterLevelForMechanismSpecificLowerLimitNorm = waterLevelForMechanismSpecificLowerLimitNorm; - WaterLevelForLowerLimitNorm = waterLevelForLowerLimitNorm; - WaterLevelForFactorizedLowerLimitNorm = waterLevelForFactorizedLowerLimitNorm; - WaveHeightForMechanismSpecificFactorizedSignalingNorm = waveHeightForMechanismSpecificFactorizedSignalingNorm; - WaveHeightForMechanismSpecificSignalingNorm = waveHeightForMechanismSpecificSignalingNorm; - WaveHeightForMechanismSpecificLowerLimitNorm = waveHeightForMechanismSpecificLowerLimitNorm; - WaveHeightForLowerLimitNorm = waveHeightForLowerLimitNorm; - WaveHeightForFactorizedLowerLimitNorm = waveHeightForFactorizedLowerLimitNorm; - WavePeriodForMechanismSpecificFactorizedSignalingNorm = wavePeriodForMechanismSpecificFactorizedSignalingNorm; - WavePeriodForMechanismSpecificSignalingNorm = wavePeriodForMechanismSpecificSignalingNorm; - WavePeriodForMechanismSpecificLowerLimitNorm = wavePeriodForMechanismSpecificLowerLimitNorm; - WavePeriodForLowerLimitNorm = wavePeriodForLowerLimitNorm; - WavePeriodForFactorizedLowerLimitNorm = wavePeriodForFactorizedLowerLimitNorm; - } - - /// - /// Creates a new instance of . - /// - /// The id of the dune location. - /// The name of the dune location. - /// The location of the dune location - /// The coastal area id of the dune location. - /// The offset of the dune location. - /// The d50 of the dune location. /// The results of the /// water level calculations for different target probabilities. /// The results of the @@ -213,81 +122,6 @@ public RoundedDouble D50 { get; } /// - /// Gets the result of the water level for the mechanism specific factorized signaling norm. - /// - public RoundedDouble WaterLevelForMechanismSpecificFactorizedSignalingNorm { get; } - - /// - /// Gets the result of the water level for the mechanism specific signaling norm. - /// - public RoundedDouble WaterLevelForMechanismSpecificSignalingNorm { get; } - - /// - /// Gets the result of the water level for the mechanism specific lower limit norm. - /// - public RoundedDouble WaterLevelForMechanismSpecificLowerLimitNorm { get; } - - /// - /// Gets the result of the water level for the lower limit norm. - /// - public RoundedDouble WaterLevelForLowerLimitNorm { get; } - - /// - /// Gets the result of the water level for the factorized lower limit norm. - /// - public RoundedDouble WaterLevelForFactorizedLowerLimitNorm { get; } - - /// - /// Gets the result of the wave height for the mechanism specific factorized signaling norm. - /// - public RoundedDouble WaveHeightForMechanismSpecificFactorizedSignalingNorm { get; } - - /// - /// Gets the result of the wave height for the mechanism specific signaling norm. - /// - public RoundedDouble WaveHeightForMechanismSpecificSignalingNorm { get; } - - /// - /// Gets the result of the wave height for the mechanism specific lower limit norm. - /// - public RoundedDouble WaveHeightForMechanismSpecificLowerLimitNorm { get; } - - /// - /// Gets the result of the wave height for the lower limit norm. - /// - public RoundedDouble WaveHeightForLowerLimitNorm { get; } - - /// - /// Gets the result of the wave height for the factorized lower limit norm. - /// - public RoundedDouble WaveHeightForFactorizedLowerLimitNorm { get; } - - /// - /// Gets the result of the wave period for the mechanism specific factorized signaling norm. - /// - public RoundedDouble WavePeriodForMechanismSpecificFactorizedSignalingNorm { get; } - - /// - /// Gets the result of the wave period for the mechanism specific signaling norm. - /// - public RoundedDouble WavePeriodForMechanismSpecificSignalingNorm { get; } - - /// - /// Gets the result of the wave period for the mechanism specific lower limit norm. - /// - public RoundedDouble WavePeriodForMechanismSpecificLowerLimitNorm { get; } - - /// - /// Gets the result of the wave period for the lower limit norm. - /// - public RoundedDouble WavePeriodForLowerLimitNorm { get; } - - /// - /// Gets the result of the wave period for the factorized lower limit norm. - /// - public RoundedDouble WavePeriodForFactorizedLowerLimitNorm { get; } - - /// /// Gets the results of the water level calculations for different target probabilities. /// public IEnumerable> WaterLevelCalculationsForTargetProbabilities { get; } Index: Riskeer/DuneErosion/test/Riskeer.DuneErosion.Forms.Test/Factories/AggregatedDuneLocationFactoryTest.cs =================================================================== diff -u -rfa3e18d541facbb8970d76133505a61c2b68786e -ra6019d296a2fac1dd494be841eb68d94f47a10d0 --- Riskeer/DuneErosion/test/Riskeer.DuneErosion.Forms.Test/Factories/AggregatedDuneLocationFactoryTest.cs (.../AggregatedDuneLocationFactoryTest.cs) (revision fa3e18d541facbb8970d76133505a61c2b68786e) +++ Riskeer/DuneErosion/test/Riskeer.DuneErosion.Forms.Test/Factories/AggregatedDuneLocationFactoryTest.cs (.../AggregatedDuneLocationFactoryTest.cs) (revision a6019d296a2fac1dd494be841eb68d94f47a10d0) @@ -129,163 +129,11 @@ } } - [Test] - public void CreateAggregatedDuneLocations_FailureMechanismNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => AggregatedDuneLocationFactory.CreateAggregatedDuneLocations(null); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("failureMechanism", exception.ParamName); - } - - [Test] - public void CreateAggregatedDuneLocations_DuneLocationWithOutput_ReturnsAggregatedDuneLocations() - { - // Setup - DuneLocation[] duneLocations = - { - CreateDuneLocation(20), - CreateDuneLocation(21) - }; - - var failureMechanism = new DuneErosionFailureMechanism(); - failureMechanism.SetDuneLocations(duneLocations); - DuneLocationsTestHelper.SetDuneLocationCalculationOutput(failureMechanism); - - // Call - IEnumerable aggregatedLocations = AggregatedDuneLocationFactory.CreateAggregatedDuneLocations(failureMechanism); - - // Assert - int expectedNrOfDuneLocations = duneLocations.Length; - Assert.AreEqual(expectedNrOfDuneLocations, aggregatedLocations.Count()); - for (var i = 0; i < expectedNrOfDuneLocations; i++) - { - DuneLocation expectedDuneLocation = duneLocations[i]; - AggregatedDuneLocation aggregatedDuneLocation = aggregatedLocations.ElementAt(i); - Assert.AreEqual(expectedDuneLocation.Id, aggregatedDuneLocation.Id); - Assert.AreEqual(expectedDuneLocation.Name, aggregatedDuneLocation.Name); - Assert.AreEqual(expectedDuneLocation.Location, aggregatedDuneLocation.Location); - Assert.AreEqual(expectedDuneLocation.CoastalAreaId, aggregatedDuneLocation.CoastalAreaId); - Assert.AreEqual(expectedDuneLocation.Offset, aggregatedDuneLocation.Offset); - Assert.AreEqual(expectedDuneLocation.D50, aggregatedDuneLocation.D50); - - AssertDuneLocationCalculationOutput(failureMechanism.CalculationsForMechanismSpecificFactorizedSignalingNorm, - expectedDuneLocation, - aggregatedDuneLocation.WaterLevelForMechanismSpecificFactorizedSignalingNorm, - aggregatedDuneLocation.WaveHeightForMechanismSpecificFactorizedSignalingNorm, - aggregatedDuneLocation.WavePeriodForMechanismSpecificFactorizedSignalingNorm); - - AssertDuneLocationCalculationOutput(failureMechanism.CalculationsForMechanismSpecificSignalingNorm, - expectedDuneLocation, - aggregatedDuneLocation.WaterLevelForMechanismSpecificSignalingNorm, - aggregatedDuneLocation.WaveHeightForMechanismSpecificSignalingNorm, - aggregatedDuneLocation.WavePeriodForMechanismSpecificSignalingNorm); - - AssertDuneLocationCalculationOutput(failureMechanism.CalculationsForMechanismSpecificLowerLimitNorm, - expectedDuneLocation, - aggregatedDuneLocation.WaterLevelForMechanismSpecificLowerLimitNorm, - aggregatedDuneLocation.WaveHeightForMechanismSpecificLowerLimitNorm, - aggregatedDuneLocation.WavePeriodForMechanismSpecificLowerLimitNorm); - - AssertDuneLocationCalculationOutput(failureMechanism.CalculationsForLowerLimitNorm, - expectedDuneLocation, - aggregatedDuneLocation.WaterLevelForLowerLimitNorm, - aggregatedDuneLocation.WaveHeightForLowerLimitNorm, - aggregatedDuneLocation.WavePeriodForLowerLimitNorm); - - AssertDuneLocationCalculationOutput(failureMechanism.CalculationsForFactorizedLowerLimitNorm, - expectedDuneLocation, - aggregatedDuneLocation.WaterLevelForFactorizedLowerLimitNorm, - aggregatedDuneLocation.WaveHeightForFactorizedLowerLimitNorm, - aggregatedDuneLocation.WavePeriodForFactorizedLowerLimitNorm); - } - } - - [Test] - public void CreateAggregatedDuneLocations_DuneLocationWithoutOutput_ReturnsAggregatedDuneLocations() - { - // Setup - DuneLocation[] duneLocations = - { - CreateDuneLocation(20), - CreateDuneLocation(21) - }; - - var failureMechanism = new DuneErosionFailureMechanism(); - failureMechanism.SetDuneLocations(duneLocations); - - // Call - IEnumerable aggregatedLocations = AggregatedDuneLocationFactory.CreateAggregatedDuneLocations(failureMechanism); - - // Assert - int expectedNrOfDuneLocations = duneLocations.Length; - Assert.AreEqual(expectedNrOfDuneLocations, aggregatedLocations.Count()); - for (var i = 0; i < expectedNrOfDuneLocations; i++) - { - DuneLocation expectedDuneLocation = duneLocations[i]; - AggregatedDuneLocation aggregatedDuneLocation = aggregatedLocations.ElementAt(i); - Assert.AreEqual(expectedDuneLocation.Id, aggregatedDuneLocation.Id); - Assert.AreEqual(expectedDuneLocation.Name, aggregatedDuneLocation.Name); - Assert.AreEqual(expectedDuneLocation.Location, aggregatedDuneLocation.Location); - Assert.AreEqual(expectedDuneLocation.CoastalAreaId, aggregatedDuneLocation.CoastalAreaId); - Assert.AreEqual(expectedDuneLocation.Offset, aggregatedDuneLocation.Offset); - Assert.AreEqual(expectedDuneLocation.D50, aggregatedDuneLocation.D50); - - Assert.IsNaN(aggregatedDuneLocation.WaterLevelForMechanismSpecificFactorizedSignalingNorm); - Assert.IsNaN(aggregatedDuneLocation.WaterLevelForMechanismSpecificSignalingNorm); - Assert.IsNaN(aggregatedDuneLocation.WaterLevelForMechanismSpecificLowerLimitNorm); - Assert.IsNaN(aggregatedDuneLocation.WaterLevelForLowerLimitNorm); - Assert.IsNaN(aggregatedDuneLocation.WaterLevelForFactorizedLowerLimitNorm); - - Assert.IsNaN(aggregatedDuneLocation.WaveHeightForMechanismSpecificFactorizedSignalingNorm); - Assert.IsNaN(aggregatedDuneLocation.WaveHeightForMechanismSpecificSignalingNorm); - Assert.IsNaN(aggregatedDuneLocation.WaveHeightForMechanismSpecificLowerLimitNorm); - Assert.IsNaN(aggregatedDuneLocation.WaveHeightForLowerLimitNorm); - Assert.IsNaN(aggregatedDuneLocation.WaveHeightForFactorizedLowerLimitNorm); - - Assert.IsNaN(aggregatedDuneLocation.WavePeriodForMechanismSpecificFactorizedSignalingNorm); - Assert.IsNaN(aggregatedDuneLocation.WavePeriodForMechanismSpecificSignalingNorm); - Assert.IsNaN(aggregatedDuneLocation.WavePeriodForMechanismSpecificLowerLimitNorm); - Assert.IsNaN(aggregatedDuneLocation.WavePeriodForLowerLimitNorm); - Assert.IsNaN(aggregatedDuneLocation.WavePeriodForFactorizedLowerLimitNorm); - } - } - private static DuneLocationCalculationOutput GetOutput(IEnumerable calculations, DuneLocation location) { return calculations.Single(c => c.DuneLocation.Equals(location)) .Output; } - - private static DuneLocation CreateDuneLocation(int seed) - { - var random = new Random(seed); - - int id = random.Next(); - return new DuneLocation(id, $"Location_{id}", new Point2D(random.NextDouble(), random.NextDouble()), new DuneLocation.ConstructionProperties - { - CoastalAreaId = random.Next(), - D50 = random.NextDouble(), - Offset = random.NextDouble() - }); - } - - private static void AssertDuneLocationCalculationOutput(IEnumerable calculations, - DuneLocation duneLocation, - RoundedDouble getWaterLevelFunc, - RoundedDouble getWaveHeightFunc, - RoundedDouble getWavePeriodFunc) - { - DuneLocationCalculationOutput expectedOutput = - calculations.Single(calculation => ReferenceEquals(duneLocation, calculation.DuneLocation)) - .Output; - - Assert.AreEqual(expectedOutput.WaterLevel, getWaterLevelFunc); - Assert.AreEqual(expectedOutput.WaveHeight, getWaveHeightFunc); - Assert.AreEqual(expectedOutput.WavePeriod, getWavePeriodFunc); - } } } \ No newline at end of file Index: Riskeer/DuneErosion/test/Riskeer.DuneErosion.Forms.Test/Views/AggregatedDuneLocationTest.cs =================================================================== diff -u -r9bded049d932924a8bed22d6758d24a0303e8ea0 -ra6019d296a2fac1dd494be841eb68d94f47a10d0 --- Riskeer/DuneErosion/test/Riskeer.DuneErosion.Forms.Test/Views/AggregatedDuneLocationTest.cs (.../AggregatedDuneLocationTest.cs) (revision 9bded049d932924a8bed22d6758d24a0303e8ea0) +++ Riskeer/DuneErosion/test/Riskeer.DuneErosion.Forms.Test/Views/AggregatedDuneLocationTest.cs (.../AggregatedDuneLocationTest.cs) (revision a6019d296a2fac1dd494be841eb68d94f47a10d0) @@ -33,106 +33,6 @@ public class AggregatedDuneLocationTest { [Test] - public void Constructor_NameNull_ThrowsArgumentNullException() - { - // Call - void Call() => new AggregatedDuneLocation(0, null, new Point2D(0, 0), 0, new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble(), new RoundedDouble()); - - // Assert - var exception = Assert.Throws(Call); - Assert.AreEqual("name", exception.ParamName); - } - - [Test] - public void Constructor_LocationNull_ThrowsArgumentNullException() - { - // Call - void Call() => new AggregatedDuneLocation(0, string.Empty, null, 0, new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), new RoundedDouble(), - new RoundedDouble(), new RoundedDouble()); - - // Assert - var exception = Assert.Throws(Call); - Assert.AreEqual("location", exception.ParamName); - } - - [Test] - public void Constructor_WithArguments_ExpectedValues() - { - // Setup - var random = new Random(21); - - long id = random.Next(); - const string name = "DuneLocationName"; - var location = new Point2D(random.NextDouble(), random.NextDouble()); - int coastalAreaId = random.Next(); - RoundedDouble offset = random.NextRoundedDouble(); - RoundedDouble d50 = random.NextRoundedDouble(); - RoundedDouble waterLevelForMechanismSpecificFactorizedSignalingNorm = random.NextRoundedDouble(); - RoundedDouble waterLevelForMechanismSpecificSignalingNorm = random.NextRoundedDouble(); - RoundedDouble waterLevelForMechanismSpecificLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble waterLevelForLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble waterLevelForFactorizedLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble waveHeightForMechanismSpecificFactorizedSignalingNorm = random.NextRoundedDouble(); - RoundedDouble waveHeightForMechanismSpecificSignalingNorm = random.NextRoundedDouble(); - RoundedDouble waveHeightForMechanismSpecificLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble waveHeightForLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble waveHeightForFactorizedLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble wavePeriodForMechanismSpecificFactorizedSignalingNorm = random.NextRoundedDouble(); - RoundedDouble wavePeriodForMechanismSpecificSignalingNorm = random.NextRoundedDouble(); - RoundedDouble wavePeriodForMechanismSpecificLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble wavePeriodForLowerLimitNorm = random.NextRoundedDouble(); - RoundedDouble wavePeriodForFactorizedLowerLimitNorm = random.NextRoundedDouble(); - - // Call - var aggregatedDuneLocation = new AggregatedDuneLocation(id, name, location, coastalAreaId, offset, d50, - waterLevelForMechanismSpecificFactorizedSignalingNorm, - waterLevelForMechanismSpecificSignalingNorm, - waterLevelForMechanismSpecificLowerLimitNorm, - waterLevelForLowerLimitNorm, - waterLevelForFactorizedLowerLimitNorm, - waveHeightForMechanismSpecificFactorizedSignalingNorm, - waveHeightForMechanismSpecificSignalingNorm, - waveHeightForMechanismSpecificLowerLimitNorm, - waveHeightForLowerLimitNorm, - waveHeightForFactorizedLowerLimitNorm, - wavePeriodForMechanismSpecificFactorizedSignalingNorm, - wavePeriodForMechanismSpecificSignalingNorm, - wavePeriodForMechanismSpecificLowerLimitNorm, - wavePeriodForLowerLimitNorm, - wavePeriodForFactorizedLowerLimitNorm); - - // Assert - Assert.AreEqual(id, aggregatedDuneLocation.Id); - Assert.AreEqual(name, aggregatedDuneLocation.Name); - Assert.AreSame(location, aggregatedDuneLocation.Location); - Assert.AreEqual(coastalAreaId, aggregatedDuneLocation.CoastalAreaId); - Assert.AreEqual(offset, aggregatedDuneLocation.Offset); - Assert.AreEqual(d50, aggregatedDuneLocation.D50); - Assert.AreEqual(waterLevelForMechanismSpecificFactorizedSignalingNorm, aggregatedDuneLocation.WaterLevelForMechanismSpecificFactorizedSignalingNorm); - Assert.AreEqual(waterLevelForMechanismSpecificSignalingNorm, aggregatedDuneLocation.WaterLevelForMechanismSpecificSignalingNorm); - Assert.AreEqual(waterLevelForMechanismSpecificLowerLimitNorm, aggregatedDuneLocation.WaterLevelForMechanismSpecificLowerLimitNorm); - Assert.AreEqual(waterLevelForLowerLimitNorm, aggregatedDuneLocation.WaterLevelForLowerLimitNorm); - Assert.AreEqual(waterLevelForFactorizedLowerLimitNorm, aggregatedDuneLocation.WaterLevelForFactorizedLowerLimitNorm); - Assert.AreEqual(waveHeightForMechanismSpecificFactorizedSignalingNorm, aggregatedDuneLocation.WaveHeightForMechanismSpecificFactorizedSignalingNorm); - Assert.AreEqual(waveHeightForMechanismSpecificSignalingNorm, aggregatedDuneLocation.WaveHeightForMechanismSpecificSignalingNorm); - Assert.AreEqual(waveHeightForMechanismSpecificLowerLimitNorm, aggregatedDuneLocation.WaveHeightForMechanismSpecificLowerLimitNorm); - Assert.AreEqual(waveHeightForLowerLimitNorm, aggregatedDuneLocation.WaveHeightForLowerLimitNorm); - Assert.AreEqual(waveHeightForFactorizedLowerLimitNorm, aggregatedDuneLocation.WaveHeightForFactorizedLowerLimitNorm); - Assert.AreEqual(wavePeriodForMechanismSpecificFactorizedSignalingNorm, aggregatedDuneLocation.WavePeriodForMechanismSpecificFactorizedSignalingNorm); - Assert.AreEqual(wavePeriodForMechanismSpecificSignalingNorm, aggregatedDuneLocation.WavePeriodForMechanismSpecificSignalingNorm); - Assert.AreEqual(wavePeriodForMechanismSpecificLowerLimitNorm, aggregatedDuneLocation.WavePeriodForMechanismSpecificLowerLimitNorm); - Assert.AreEqual(wavePeriodForLowerLimitNorm, aggregatedDuneLocation.WavePeriodForLowerLimitNorm); - Assert.AreEqual(wavePeriodForFactorizedLowerLimitNorm, aggregatedDuneLocation.WavePeriodForFactorizedLowerLimitNorm); - } - - [Test] public void Constructor_WaterLevelCalculationsForTargetProbabilitiesNull_ThrowsArgumentNullException() { // Call