Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestFaultTreeIllustrationPointTest.cs =================================================================== diff -u -rb7f14623d48e8451968836803a80cd9d51492164 -r3a33e7253e29eb7649dcfc0f675169559b0eefb9 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestFaultTreeIllustrationPointTest.cs (.../TestFaultTreeIllustrationPointTest.cs) (revision b7f14623d48e8451968836803a80cd9d51492164) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestFaultTreeIllustrationPointTest.cs (.../TestFaultTreeIllustrationPointTest.cs) (revision 3a33e7253e29eb7649dcfc0f675169559b0eefb9) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System.Linq; using NUnit.Framework; using Ringtoets.Common.Data.IllustrationPoints; using Ringtoets.Common.Data.TestUtil.IllustrationPoints; @@ -43,7 +44,7 @@ } [Test] - public void ParameteredConstructor_ExpectedValues() + public void ParameteredConstructor_WithBeta_ExpectedValues() { // Setup const double beta = 1.23; @@ -58,5 +59,42 @@ CollectionAssert.IsEmpty(illustrationPoint.Stochasts); Assert.AreEqual(beta, illustrationPoint.Beta, illustrationPoint.Beta.GetAccuracy()); } + + [Test] + public void ParameteredConstructor_WithName_ExpectedValues() + { + // Call + var illustrationPoint = new TestFaultTreeIllustrationPoint("Test Name"); + + // Assert + Assert.IsInstanceOf(illustrationPoint); + + Assert.AreEqual("Test Name", illustrationPoint.Name); + CollectionAssert.IsEmpty(illustrationPoint.Stochasts); + Assert.AreEqual(3.14, illustrationPoint.Beta, illustrationPoint.Beta.GetAccuracy()); + } + + [Test] + public void ParameteredConstructor_WithStochast_ExpectedValues() + { + // Setup + var stochast = new Stochast("Stochast 1", 5.0, 10.0); + + // Call + var illustrationPoint = new TestFaultTreeIllustrationPoint(new[] + { + stochast + }); + + // Assert + Assert.IsInstanceOf(illustrationPoint); + + Assert.AreEqual("Illustration Point", illustrationPoint.Name); + Assert.AreEqual(3.14, illustrationPoint.Beta, illustrationPoint.Beta.GetAccuracy()); + Assert.IsNotEmpty(illustrationPoint.Stochasts); + Assert.AreEqual(stochast.Name, illustrationPoint.Stochasts.First().Name); + Assert.AreEqual(stochast.Alpha, illustrationPoint.Stochasts.First().Alpha); + Assert.AreEqual(stochast.Duration, illustrationPoint.Stochasts.First().Duration); + } } } \ No newline at end of file