Index: Ringtoets.sln
===================================================================
diff -u -r8cc6abb787e214b0019f1feab63b6107e864ef87 -r4a01c1115bba7160624e66eff4196c56324b16b5
--- Ringtoets.sln (.../Ringtoets.sln) (revision 8cc6abb787e214b0019f1feab63b6107e864ef87)
+++ Ringtoets.sln (.../Ringtoets.sln) (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -701,7 +701,7 @@
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.HydraRing.Calculation.TestUtil.Test", "Ringtoets\HydraRing\test\Ringtoets.HydraRing.Calculation.TestUtil.Test\Riskeer.HydraRing.Calculation.TestUtil.Test.csproj", "{89A94832-5337-4177-97D0-92CD77A375D7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.HydraRing.Calculation.TestUtil.Test", "Ringtoets\HydraRing\test\Riskeer.HydraRing.Calculation.TestUtil.Test\Riskeer.HydraRing.Calculation.TestUtil.Test.csproj", "{89A94832-5337-4177-97D0-92CD77A375D7}"
ProjectSection(ProjectDependencies) = postProject
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/HydraRingCalculationSettingsTestFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/HydraRingDataEqualityHelperTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/GeneralResultTestFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestFaultTreeIllustrationPointTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestGeneralResultTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestSubMechanismIllustrationPointTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestWindDirectionTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/Properties/AssemblyInfo.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/Riskeer.HydraRing.Calculation.TestUtil.Test.csproj'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/TestHydraRingVariableTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 4a01c1115bba7160624e66eff4196c56324b16b5 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil.Test/packages.config'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/HydraRingCalculationSettingsTestFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/HydraRingCalculationSettingsTestFactoryTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/HydraRingCalculationSettingsTestFactoryTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,20 @@
+using NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data.Input;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test
+{
+ [TestFixture]
+ public class HydraRingCalculationSettingsTestFactoryTest
+ {
+ [Test]
+ public void CreateSettings_Always_ReturnsHydraRingCalculationSettings()
+ {
+ // Call
+ HydraRingCalculationSettings settings = HydraRingCalculationSettingsTestFactory.CreateSettings();
+
+ // Assert
+ Assert.IsEmpty(settings.HlcdFilePath);
+ Assert.IsEmpty(settings.PreprocessorDirectory);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/HydraRingDataEqualityHelperTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/HydraRingDataEqualityHelperTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/HydraRingDataEqualityHelperTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,192 @@
+// Copyright (C) Stichting Deltares 2018. 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 NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data;
+using Riskeer.HydraRing.Calculation.Data.Variables;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test
+{
+ [TestFixture]
+ public class HydraRingDataEqualityHelperTest
+ {
+ [Test]
+ public void AreEqual_EqualHydraRingVariables_DoesNotThrowAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ HydraRingDataEqualityHelper.AreEqual(expected, actual);
+ }
+
+ [Test]
+ public void AreEqual_DifferentNumberOfHydraRingVariables_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+
+ [Test]
+ public void AreEqual_DifferentVariableIds_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(111, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+
+ [Test]
+ public void AreEqual_DifferentDistributionTypes_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Deterministic, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+
+ [Test]
+ public void AreEqual_DifferentValues_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 22.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+
+ [Test]
+ public void AreEqual_DifferentDeviationTypes_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+
+ [Test]
+ public void AreEqual_DifferentMeans_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.33, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+
+ [Test]
+ public void AreEqual_DifferentVariabilities_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.44, 5.5, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+
+ [Test]
+ public void AreEqual_DifferentShifts_ThrowsAssertionException()
+ {
+ var expected = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7)
+ };
+
+ var actual = new HydraRingVariable[]
+ {
+ new TestHydraRingVariable(1, HydraRingDistributionType.LogNormal, HydraRingDeviationType.Variation, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7),
+ new TestHydraRingVariable(11, HydraRingDistributionType.Normal, HydraRingDeviationType.Standard, 2.2, 3.3, 4.4, 5.55, 6.6, 7.7)
+ };
+
+ Assert.Throws(() => HydraRingDataEqualityHelper.AreEqual(expected, actual));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/GeneralResultTestFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/GeneralResultTestFactoryTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/GeneralResultTestFactoryTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,59 @@
+// Copyright (C) Stichting Deltares 2018. 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.Linq;
+using NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data.Output.IllustrationPoints;
+using Riskeer.HydraRing.Calculation.TestUtil.IllustrationPoints;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test.IllustrationPoints
+{
+ [TestFixture]
+ public class GeneralResultTestFactoryTest
+ {
+ [Test]
+ public void CreateGeneralResultWithDuplicateStochasts_ExpectedProperties()
+ {
+ // Call
+ GeneralResult generalResult = GeneralResultTestFactory.CreateGeneralResultWithDuplicateStochasts();
+
+ // Assert
+ Assert.IsInstanceOf(generalResult);
+ Assert.AreEqual(0.5, generalResult.Beta);
+
+ var expectedWindDirection = new TestWindDirection();
+ AssertWindDirection(expectedWindDirection, generalResult.GoverningWindDirection);
+ Assert.AreEqual(2, generalResult.Stochasts.Count());
+ foreach (Stochast stochast in generalResult.Stochasts)
+ {
+ Assert.AreEqual("Stochast A", stochast.Name);
+ }
+
+ CollectionAssert.IsEmpty(generalResult.IllustrationPoints);
+ }
+
+ private static void AssertWindDirection(WindDirection expected, WindDirection actual)
+ {
+ Assert.AreEqual(expected.Name, actual.Name);
+ Assert.AreEqual(expected.Angle, actual.Angle);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestFaultTreeIllustrationPointTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestFaultTreeIllustrationPointTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestFaultTreeIllustrationPointTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,45 @@
+// Copyright (C) Stichting Deltares 2018. 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 NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data.Output.IllustrationPoints;
+using Riskeer.HydraRing.Calculation.TestUtil.IllustrationPoints;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test.IllustrationPoints
+{
+ [TestFixture]
+ public class TestFaultTreeIllustrationPointTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var illustrationPoint = new TestFaultTreeIllustrationPoint();
+
+ // Assert
+ Assert.IsInstanceOf(illustrationPoint);
+ Assert.AreEqual("Illustration point", illustrationPoint.Name);
+ CollectionAssert.IsEmpty(illustrationPoint.Stochasts);
+ Assert.AreEqual(1, illustrationPoint.Beta);
+ Assert.AreEqual(CombinationType.And, illustrationPoint.CombinationType);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestGeneralResultTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestGeneralResultTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestGeneralResultTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,99 @@
+// Copyright (C) Stichting Deltares 2018. 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.Collections.Generic;
+using System.Linq;
+using NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data.Output.IllustrationPoints;
+using Riskeer.HydraRing.Calculation.TestUtil.IllustrationPoints;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test.IllustrationPoints
+{
+ [TestFixture]
+ public class TestGeneralResultTest
+ {
+ [Test]
+ public void Constructor_ExpectedProperties()
+ {
+ // Call
+ var generalResult = new TestGeneralResult();
+
+ // Assert
+ Assert.IsInstanceOf(generalResult);
+ Assert.AreEqual(0, generalResult.Beta);
+
+ var expectedWindDirection = new TestWindDirection();
+ AssertWindDirection(expectedWindDirection, generalResult.GoverningWindDirection);
+ CollectionAssert.IsEmpty(generalResult.Stochasts);
+ CollectionAssert.IsEmpty(generalResult.IllustrationPoints);
+ }
+
+ [Test]
+ public void CreateGeneralResultWithFaultTreeIllustrationPoints_ExpectedProperties()
+ {
+ // Call
+ TestGeneralResult generalResult = TestGeneralResult.CreateGeneralResultWithFaultTreeIllustrationPoints();
+
+ // Assert
+ Assert.IsInstanceOf(generalResult);
+ Assert.AreEqual(0, generalResult.Beta);
+
+ var expectedWindDirection = new TestWindDirection();
+ AssertWindDirection(expectedWindDirection, generalResult.GoverningWindDirection);
+ CollectionAssert.IsEmpty(generalResult.Stochasts);
+
+ KeyValuePair topLevelIllustrationPoint =
+ generalResult.IllustrationPoints.Single();
+ WindDirectionClosingSituation actualWindDirectionClosingSituation = topLevelIllustrationPoint.Key;
+ AssertWindDirection(expectedWindDirection, actualWindDirectionClosingSituation.WindDirection);
+ Assert.AreEqual("closing situation", actualWindDirectionClosingSituation.ClosingSituation);
+ Assert.IsInstanceOf(topLevelIllustrationPoint.Value.Data);
+ }
+
+ [Test]
+ public void CreateGeneralResultWithSubMechanismIllustrationPoints_ExpectedProperties()
+ {
+ // Call
+ TestGeneralResult generalResult = TestGeneralResult.CreateGeneralResultWithSubMechanismIllustrationPoints();
+
+ // Assert
+ Assert.IsInstanceOf(generalResult);
+ Assert.AreEqual(0, generalResult.Beta);
+
+ var expectedWindDirection = new TestWindDirection();
+ AssertWindDirection(expectedWindDirection, generalResult.GoverningWindDirection);
+ CollectionAssert.IsEmpty(generalResult.Stochasts);
+
+ KeyValuePair topLevelIllustrationPoint =
+ generalResult.IllustrationPoints.Single();
+ WindDirectionClosingSituation actualWindDirectionClosingSituation = topLevelIllustrationPoint.Key;
+ AssertWindDirection(expectedWindDirection, actualWindDirectionClosingSituation.WindDirection);
+ Assert.AreEqual("closing situation", actualWindDirectionClosingSituation.ClosingSituation);
+ Assert.IsInstanceOf(topLevelIllustrationPoint.Value.Data);
+ }
+
+ private static void AssertWindDirection(WindDirection expected, WindDirection actual)
+ {
+ Assert.AreEqual(expected.Name, actual.Name);
+ Assert.AreEqual(expected.Angle, actual.Angle);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestSubMechanismIllustrationPointTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestSubMechanismIllustrationPointTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestSubMechanismIllustrationPointTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,59 @@
+// Copyright (C) Stichting Deltares 2018. 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 NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data.Output.IllustrationPoints;
+using Riskeer.HydraRing.Calculation.TestUtil.IllustrationPoints;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test.IllustrationPoints
+{
+ [TestFixture]
+ public class TestSubMechanismIllustrationPointTest
+ {
+ [Test]
+ public void DefaultConstructor_ExpectedValues()
+ {
+ // Call
+ var illustrationPoint = new TestSubMechanismIllustrationPoint();
+
+ // Assert
+ Assert.IsInstanceOf(illustrationPoint);
+ Assert.AreEqual("Illustration point", illustrationPoint.Name);
+ CollectionAssert.IsEmpty(illustrationPoint.Stochasts);
+ CollectionAssert.IsEmpty(illustrationPoint.Results);
+ Assert.AreEqual(1, illustrationPoint.Beta);
+ }
+
+ [Test]
+ public void Constructor_WithName_ExpectedValues()
+ {
+ // Call
+ var illustrationPoint = new TestSubMechanismIllustrationPoint("Point name");
+
+ // Assert
+ Assert.IsInstanceOf(illustrationPoint);
+ Assert.AreEqual("Point name", illustrationPoint.Name);
+ CollectionAssert.IsEmpty(illustrationPoint.Stochasts);
+ CollectionAssert.IsEmpty(illustrationPoint.Results);
+ Assert.AreEqual(1, illustrationPoint.Beta);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestWindDirectionTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestWindDirectionTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/IllustrationPoints/TestWindDirectionTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,43 @@
+// Copyright (C) Stichting Deltares 2018. 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 NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data.Output.IllustrationPoints;
+using Riskeer.HydraRing.Calculation.TestUtil.IllustrationPoints;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test.IllustrationPoints
+{
+ [TestFixture]
+ public class TestWindDirectionTest
+ {
+ [Test]
+ public void DefaultConstructor_ReturnsExpectedProperties()
+ {
+ // Call
+ var windDirection = new TestWindDirection();
+
+ // Assert
+ Assert.IsInstanceOf(windDirection);
+ Assert.AreEqual("SSE", windDirection.Name);
+ Assert.AreEqual(123, windDirection.Angle);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/Properties/AssemblyInfo.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/Properties/AssemblyInfo.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,25 @@
+// Copyright (C) Stichting Deltares 2018. 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.Reflection;
+
+[assembly: AssemblyTitle("Riskeer.HydraRing.Calculation.TestUtil.Test")]
+[assembly: AssemblyProduct("Riskeer.HydraRing.Calculation.TestUtil.Test")]
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/Riskeer.HydraRing.Calculation.TestUtil.Test.csproj
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/Riskeer.HydraRing.Calculation.TestUtil.Test.csproj (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/Riskeer.HydraRing.Calculation.TestUtil.Test.csproj (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,44 @@
+
+
+
+ {89A94832-5337-4177-97D0-92CD77A375D7}
+ Riskeer.HydraRing.Calculation.TestUtil.Test
+ Riskeer.HydraRing.Calculation.TestUtil.Test
+
+
+
+
+ ..\..\..\..\packages\NUnit.3.8.1\lib\net40\nunit.framework.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copying.licenseheader
+
+
+
+
+
+ {888D4097-8BC2-4703-9FB1-8744C94D525E}
+ Riskeer.HydraRing.Calculation
+
+
+ {74CBA865-9338-447F-BAD9-28312446AE84}
+ Riskeer.HydraRing.Calculation.TestUtil
+
+
+
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/TestHydraRingVariableTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/TestHydraRingVariableTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/TestHydraRingVariableTest.cs (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,59 @@
+// Copyright (C) Stichting Deltares 2018. 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 NUnit.Framework;
+using Riskeer.HydraRing.Calculation.Data;
+
+namespace Riskeer.HydraRing.Calculation.TestUtil.Test
+{
+ [TestFixture]
+ public class TestHydraRingVariableTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Setup
+ const int id = 1;
+ const HydraRingDistributionType distributionType = HydraRingDistributionType.Normal;
+ const HydraRingDeviationType deviationType = HydraRingDeviationType.Standard;
+ const double value = 2.2;
+ const double param1 = 3.3;
+ const double param2 = 4.4;
+ const double param3 = 5.5;
+ const double param4 = 6.6;
+ const double variation = 7.7;
+
+ // Call
+ var variable = new TestHydraRingVariable(id, distributionType, deviationType, value, param1, param2, param3, param4, variation);
+
+ // Assert
+ Assert.AreEqual(id, variable.VariableId);
+ Assert.AreEqual(distributionType, variable.DistributionType);
+ Assert.AreEqual(deviationType, variable.DeviationType);
+ Assert.AreEqual(value, variable.Value);
+ Assert.AreEqual(param1, variable.Parameter1);
+ Assert.AreEqual(param2, variable.Parameter2);
+ Assert.AreEqual(param3, variable.Parameter3);
+ Assert.AreEqual(param4, variable.Parameter4);
+ Assert.AreEqual(variation, variable.CoefficientOfVariation);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/packages.config
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/packages.config (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.Calculation.TestUtil.Test/packages.config (revision 4a01c1115bba7160624e66eff4196c56324b16b5)
@@ -0,0 +1,26 @@
+
+
+
+
+
\ No newline at end of file