Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/IllustrationPoints/SubmechanismIllustrationPointStochastCreateExtensionsTest.cs =================================================================== diff -u -ra06740b53b2afe4f6db49a0f54ba9f743da131b1 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/IllustrationPoints/SubmechanismIllustrationPointStochastCreateExtensionsTest.cs (.../SubmechanismIllustrationPointStochastCreateExtensionsTest.cs) (revision a06740b53b2afe4f6db49a0f54ba9f743da131b1) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/IllustrationPoints/SubmechanismIllustrationPointStochastCreateExtensionsTest.cs (.../SubmechanismIllustrationPointStochastCreateExtensionsTest.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -40,7 +40,7 @@ // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("realizedStochast", paramName); + Assert.AreEqual("submechanismIllustrationPointStochast", paramName); } [Test] @@ -74,7 +74,7 @@ // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("realizedStochast", paramName); + Assert.AreEqual("submechanismIllustrationPointStochast", paramName); } [Test] Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/StochastConverter.cs =================================================================== diff -u -ra06740b53b2afe4f6db49a0f54ba9f743da131b1 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/StochastConverter.cs (.../StochastConverter.cs) (revision a06740b53b2afe4f6db49a0f54ba9f743da131b1) +++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/StochastConverter.cs (.../StochastConverter.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -22,7 +22,7 @@ using System; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using HydraStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; -using HydraRealizedStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.RealizedStochast; +using HydraSubmechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubmechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.IllustrationPoints { @@ -49,23 +49,23 @@ } /// - /// Creates a new instance of based on the information of . + /// Creates a new instance of based on the information of . /// - /// The to base the + /// The to base the /// to create on. /// The newly created . - /// Thrown when + /// Thrown when /// is null. - public static SubmechanismIllustrationPointStochast CreateSubmechanismIllustrationStochast(HydraRealizedStochast hydraRealizedStochast) + public static SubmechanismIllustrationPointStochast CreateSubmechanismIllustrationStochast(HydraSubmechanismIllustrationPointStochast hydraSubmechanismIllustrationPointStochast) { - if (hydraRealizedStochast == null) + if (hydraSubmechanismIllustrationPointStochast == null) { - throw new ArgumentNullException(nameof(hydraRealizedStochast)); + throw new ArgumentNullException(nameof(hydraSubmechanismIllustrationPointStochast)); } - return new SubmechanismIllustrationPointStochast(hydraRealizedStochast.Name, - hydraRealizedStochast.Duration, - hydraRealizedStochast.Alpha, - hydraRealizedStochast.Realization); + return new SubmechanismIllustrationPointStochast(hydraSubmechanismIllustrationPointStochast.Name, + hydraSubmechanismIllustrationPointStochast.Duration, + hydraSubmechanismIllustrationPointStochast.Alpha, + hydraSubmechanismIllustrationPointStochast.Realization); } } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs =================================================================== diff -u -r66a40e718fdf95596f8897d81af4a1a0144cfae4 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs (.../GeneralResultConverterTest.cs) (revision 66a40e718fdf95596f8897d81af4a1a0144cfae4) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/GeneralResultConverterTest.cs (.../GeneralResultConverterTest.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -30,13 +30,13 @@ using HydraGeneralResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.GeneralResult; using HydraWindDirection = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirection; using HydraStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; -using HydraRealizedStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.RealizedStochast; using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; using HydraWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; using HydraIllustrationPointTreeNode = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointTreeNode; using HydraCombinationType = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.CombinationType; using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; using HydraFaultTreeIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.FaultTreeIllustrationPoint; +using HydraSubmechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubmechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.Test.IllustrationPoints { @@ -94,7 +94,7 @@ double beta = random.NextDouble(); var hydraIllustrationPoint = new HydraSubMechanismIllustrationPoint("Illustration Point", - Enumerable.Empty(), + Enumerable.Empty(), Enumerable.Empty(), beta); var hydraIllustrationTreeNode = new HydraIllustrationPointTreeNode(hydraIllustrationPoint); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/IllustrationPointConverterTest.cs =================================================================== diff -u -ra06740b53b2afe4f6db49a0f54ba9f743da131b1 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/IllustrationPointConverterTest.cs (.../IllustrationPointConverterTest.cs) (revision a06740b53b2afe4f6db49a0f54ba9f743da131b1) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/IllustrationPointConverterTest.cs (.../IllustrationPointConverterTest.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -26,8 +26,8 @@ using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; -using HydraRealizedStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.RealizedStochast; using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; +using HydraSubmechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubmechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.Test.IllustrationPoints { @@ -57,7 +57,7 @@ double alpha = random.NextDouble(); double duration = random.NextDouble(); double realization = random.NextDouble(); - var hydraRealizedStochast = new HydraRealizedStochast(name, duration, alpha, realization); + var hydraRealizedStochast = new HydraSubmechanismIllustrationPointStochast(name, duration, alpha, realization); double beta = random.NextDouble(); var subMechanismIllustrationPoint = new HydraSubMechanismIllustrationPoint("name", new[] @@ -79,7 +79,7 @@ Assert.AreEqual(hydraIllustrationPointResult.Description, illustrationPointResult.Description); Assert.AreEqual(hydraIllustrationPointResult.Value, illustrationPointResult.Value, illustrationPointResult.Value.GetAccuracy()); - SubmechanismIllustrationPointStochast stochast = illustrationPoint.Stochasts.Single(); + Data.Hydraulics.IllustrationPoints.SubmechanismIllustrationPointStochast stochast = illustrationPoint.Stochasts.Single(); Assert.AreEqual(hydraRealizedStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(duration, stochast.Duration, stochast.Duration.GetAccuracy()); Assert.AreEqual(hydraRealizedStochast.Name, stochast.Name); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs =================================================================== diff -u -ra06740b53b2afe4f6db49a0f54ba9f743da131b1 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs (.../StochastConverterTest.cs) (revision a06740b53b2afe4f6db49a0f54ba9f743da131b1) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs (.../StochastConverterTest.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -25,7 +25,7 @@ using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.IllustrationPoints; using HydraStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.Stochast; -using HydraRealizedStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.RealizedStochast; +using HydraSubmechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubmechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.Test.IllustrationPoints { @@ -71,7 +71,7 @@ // Assert string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("hydraRealizedStochast", paramName); + Assert.AreEqual("hydraSubmechanismIllustrationPointStochast", paramName); } [Test] @@ -85,7 +85,7 @@ double alpha = random.NextDouble(); double realization = random.NextDouble(); - var hydraStochast = new HydraRealizedStochast(name, duration, alpha, realization); + var hydraStochast = new HydraSubmechanismIllustrationPointStochast(name, duration, alpha, realization); // Call SubmechanismIllustrationPointStochast stochast = StochastConverter.CreateSubmechanismIllustrationStochast(hydraStochast); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionClosingSituationIllustrationPointConverterTest.cs =================================================================== diff -u -ra06740b53b2afe4f6db49a0f54ba9f743da131b1 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionClosingSituationIllustrationPointConverterTest.cs (.../WindDirectionClosingSituationIllustrationPointConverterTest.cs) (revision a06740b53b2afe4f6db49a0f54ba9f743da131b1) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionClosingSituationIllustrationPointConverterTest.cs (.../WindDirectionClosingSituationIllustrationPointConverterTest.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -29,8 +29,8 @@ using HydraSubMechanismIllustrationPoint = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubMechanismIllustrationPoint; using HydraWindDirectionClosingSituation = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.WindDirectionClosingSituation; using HydraIllustrationPointResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.IllustrationPointResult; -using HydraRealizedStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.RealizedStochast; using HydraRingTestWindDirection = Ringtoets.HydraRing.Calculation.TestUtil.IllustrationPoints.TestWindDirection; +using HydraSubmechanismIllustrationPointStochast = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.SubmechanismIllustrationPointStochast; namespace Ringtoets.Common.Service.Test.IllustrationPoints { @@ -43,7 +43,7 @@ // Setup var hydraSubMechanismIllustrationPoint = new HydraSubMechanismIllustrationPoint("name", - Enumerable.Empty(), + Enumerable.Empty(), Enumerable.Empty(), double.NaN); @@ -93,7 +93,7 @@ double alpha = random.NextDouble(); double duration = random.NextDouble(); double realization = random.NextDouble(); - var hydraRealizedStochast = new HydraRealizedStochast(name, duration, alpha, realization); + var hydraRealizedStochast = new HydraSubmechanismIllustrationPointStochast(name, duration, alpha, realization); double beta = random.NextDouble(); var subMechanismIllustrationPoint = new HydraSubMechanismIllustrationPoint("name", new[] @@ -124,7 +124,7 @@ Assert.AreEqual(hydraIllustrationPointResult.Description, illustrationPointResult.Description); Assert.AreEqual(hydraIllustrationPointResult.Value, illustrationPointResult.Value, illustrationPointResult.Value.GetAccuracy()); - SubmechanismIllustrationPointStochast stochast = illustrationPoint.Stochasts.Single(); + Data.Hydraulics.IllustrationPoints.SubmechanismIllustrationPointStochast stochast = illustrationPoint.Stochasts.Single(); Assert.AreEqual(hydraRealizedStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(hydraRealizedStochast.Duration, stochast.Duration, stochast.Duration.GetAccuracy()); Assert.AreEqual(hydraRealizedStochast.Name, stochast.Name); Fisheye: Tag 20c6cddf9031f8721e60fceba6b3a6bc2791522a refers to a dead (removed) revision in file `Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Output/IllustrationPoints/RealizedStochast.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Output/IllustrationPoints/SubmechanismIllustrationPoint.cs =================================================================== diff -u -r60798b6c24a14033cf598daa43ec844c7ca00326 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Output/IllustrationPoints/SubmechanismIllustrationPoint.cs (.../SubmechanismIllustrationPoint.cs) (revision 60798b6c24a14033cf598daa43ec844c7ca00326) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Output/IllustrationPoints/SubmechanismIllustrationPoint.cs (.../SubmechanismIllustrationPoint.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -33,7 +33,7 @@ /// Creates a new instance of . /// /// The name of the illustration point. - /// A collection of + /// A collection of /// that are associated with this illustration point. /// A collection of /// that are associated with this @@ -42,7 +42,7 @@ /// Thrown when , /// , or is null. public SubMechanismIllustrationPoint(string name, - IEnumerable stochasts, + IEnumerable stochasts, IEnumerable illustrationPointResults, double beta) { @@ -71,9 +71,9 @@ public string Name { get; } /// - /// Gets the stochasts that were realized. + /// Gets the realized stochasts that belong to this submechanism illustration point. /// - public IEnumerable Stochasts { get; } + public IEnumerable Stochasts { get; } /// /// Gets the beta values that were realized. Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Output/IllustrationPoints/SubmechanismIllustrationPointStochast.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Output/IllustrationPoints/SubmechanismIllustrationPointStochast.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Output/IllustrationPoints/SubmechanismIllustrationPointStochast.cs (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -0,0 +1,52 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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; + +namespace Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints +{ + /// + /// Container of alpha value definitions read from a Hydra-Ring output database with + /// a realization of the described stochast. + /// + public class SubmechanismIllustrationPointStochast : Stochast + { + /// + /// Creates an new instance of . + /// + /// The name. + /// The duration. + /// The alpha. + /// The realization. + /// Thrown when + /// is null. + public SubmechanismIllustrationPointStochast(string name, double duration, double alpha, double realization) + : base(name, duration, alpha) + { + Realization = realization; + } + + /// + /// Gets the realization. + /// + public double Realization { get; } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/IllustrationPoints/IllustrationPointsParser.cs =================================================================== diff -u -r40c4d9acffd63278a51a53a1655efff0ad988592 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/IllustrationPoints/IllustrationPointsParser.cs (.../IllustrationPointsParser.cs) (revision 40c4d9acffd63278a51a53a1655efff0ad988592) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/IllustrationPoints/IllustrationPointsParser.cs (.../IllustrationPointsParser.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -38,7 +38,7 @@ private readonly Dictionary> faultTreeStochasts = new Dictionary>(); private readonly Dictionary faultTreeBetaValues = new Dictionary(); - private readonly Dictionary> subMechanismStochasts = new Dictionary>(); + private readonly Dictionary> subMechanismStochasts = new Dictionary>(); private readonly Dictionary subMechanismBetaValues = new Dictionary(); private readonly Dictionary> subMechanismResults = new Dictionary>(); @@ -152,7 +152,7 @@ double subMechanismIllustrationPointBeta = subMechanismBetaValues[key]; - var illustrationPointStochasts = new List(); + var illustrationPointStochasts = new List(); AddRange(illustrationPointStochasts, subMechanismStochasts[key]); var illustrationPointResults = new List(); @@ -226,7 +226,7 @@ } /// - /// Parses objects from the . + /// Parses objects from the . /// /// The database reader. /// Throw when the read , @@ -250,10 +250,10 @@ var key = new ThreeKeyIndex(windDirectionId, closingSituationid, subMechanismId); if (!subMechanismStochasts.ContainsKey(key)) { - subMechanismStochasts[key] = new List(); + subMechanismStochasts[key] = new List(); } - subMechanismStochasts[key].Add(new RealizedStochast(name, duration, alpha, realization)); + subMechanismStochasts[key].Add(new SubmechanismIllustrationPointStochast(name, duration, alpha, realization)); } } @@ -394,7 +394,7 @@ { var dataKey = new ThreeKeyIndex(windDirectionClosingSituation.Item1, windDirectionClosingSituation.Item3, subMechanismId); - var illustrationPointStochasts = new List(); + var illustrationPointStochasts = new List(); var illustrationPointResults = new List(); if (subMechanismStochasts.ContainsKey(dataKey)) Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj =================================================================== diff -u -r0fd23ff8e68b5f0d18d344d104bc68216cb49b51 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision 0fd23ff8e68b5f0d18d344d104bc68216cb49b51) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -120,7 +120,7 @@ - + Fisheye: Tag 20c6cddf9031f8721e60fceba6b3a6bc2791522a refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/RealizedStochastTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/SubMechanismIllustrationPointTest.cs =================================================================== diff -u -ra6da010d4a68dbf5b4571ea39850ee92f62d2496 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/SubMechanismIllustrationPointTest.cs (.../SubMechanismIllustrationPointTest.cs) (revision a6da010d4a68dbf5b4571ea39850ee92f62d2496) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/SubMechanismIllustrationPointTest.cs (.../SubMechanismIllustrationPointTest.cs) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -35,7 +35,7 @@ { // Call TestDelegate call = () => new SubMechanismIllustrationPoint(null, - Enumerable.Empty(), + Enumerable.Empty(), Enumerable.Empty(), 123); @@ -59,7 +59,7 @@ public void Constructor_IllustrationPointResultsNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new SubMechanismIllustrationPoint("Name", Enumerable.Empty(), null, 123); + TestDelegate call = () => new SubMechanismIllustrationPoint("Name", Enumerable.Empty(), null, 123); // Assert var exception = Assert.Throws(call); @@ -75,7 +75,7 @@ var random = new Random(21); double beta = random.NextDouble(); - IEnumerable stochasts = Enumerable.Empty(); + IEnumerable stochasts = Enumerable.Empty(); IEnumerable illustrationPointResults = Enumerable.Empty(); // Call Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/SubmechanismIllustrationPointStochastTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/SubmechanismIllustrationPointStochastTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/SubmechanismIllustrationPointStochastTest.cs (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -0,0 +1,64 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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 NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints; + +namespace Ringtoets.HydraRing.Calculation.Test.Data.Output.IllustrationPoints +{ + [TestFixture] + public class SubmechanismIllustrationPointStochastTest + { + [Test] + public void Constructor_NameNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new SubmechanismIllustrationPointStochast(null, double.NaN, double.NaN, double.NaN); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("name", exception.ParamName); + } + + [Test] + public void Constructor_WithParameters_ReturnsNewInstance() + { + // Setup + const string name = "stochast name"; + + var random = new Random(21); + double duration = random.NextDouble(); + double alpha = random.NextDouble(); + double realization = random.NextDouble(); + + // Call + var stochast = new SubmechanismIllustrationPointStochast(name, duration, alpha, realization); + + // Assert + Assert.IsInstanceOf(stochast); + Assert.AreEqual(name, stochast.Name); + Assert.AreEqual(duration, stochast.Duration); + Assert.AreEqual(alpha, stochast.Alpha); + Assert.AreEqual(realization, stochast.Realization); + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj =================================================================== diff -u -r0fd23ff8e68b5f0d18d344d104bc68216cb49b51 -r20c6cddf9031f8721e60fceba6b3a6bc2791522a --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 0fd23ff8e68b5f0d18d344d104bc68216cb49b51) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 20c6cddf9031f8721e60fceba6b3a6bc2791522a) @@ -119,7 +119,7 @@ - +