Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResult.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResult.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResult.cs (revision b23df716dfc99572b230f5c5aca57d1eb8249089)
@@ -0,0 +1,71 @@
+// 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 System.Collections.Generic;
+
+namespace Ringtoets.Common.Data.Hydraulics.IllustrationPoints
+{
+ ///
+ /// The general illustration points result.
+ ///
+ public class GeneralResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The beta value that was realized.
+ /// The governing wind direction.
+ /// The general alpha values.
+ /// Thrown when
+ /// or is null.
+ public GeneralResult(double beta, WindDirection governingWindirection, IEnumerable stochasts)
+ {
+ if (governingWindirection == null)
+ {
+ throw new ArgumentNullException(nameof(governingWindirection));
+ }
+ if (stochasts == null)
+ {
+ throw new ArgumentNullException(nameof(stochasts));
+ }
+
+ Beta = beta;
+ GoverningWindirection = governingWindirection;
+ Stochasts = stochasts;
+ }
+
+ ///
+ /// Gets or sets the general beta value.
+ ///
+ public double Beta { get; }
+
+ ///
+ /// Gets or sets the governing wind direction.
+ ///
+ public WindDirection GoverningWindirection { get; }
+
+ ///
+ /// Gets or sets the general alpha values.
+ ///
+ public IEnumerable Stochasts { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -r1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9 -rb23df716dfc99572b230f5c5aca57d1eb8249089
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision b23df716dfc99572b230f5c5aca57d1eb8249089)
@@ -68,6 +68,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultTest.cs (revision b23df716dfc99572b230f5c5aca57d1eb8249089)
@@ -0,0 +1,76 @@
+// 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 System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework;
+using Ringtoets.Common.Data.Hydraulics.IllustrationPoints;
+
+namespace Ringtoets.Common.Data.Test.Hydraulics.IllustrationPoints
+{
+ [TestFixture]
+ public class GeneralResultTest
+ {
+ [Test]
+ public void Constructor_WindDirectionNull_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate call = () => new GeneralResult(0, null, Enumerable.Empty());
+
+ // Assert
+ string paramName = Assert.Throws(call).ParamName;
+ Assert.AreEqual("governingWindirection", paramName);
+ }
+
+ [Test]
+ public void Constructor_StochastNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var windDirection = new WindDirection("", 0);
+
+ // Call
+ TestDelegate call = () => new GeneralResult(0, windDirection, null);
+
+ // Assert
+ string paramName = Assert.Throws(call).ParamName;
+ Assert.AreEqual("stochasts", paramName);
+ }
+
+ [Test]
+ public void Constructor_ValidArguments_ExpectedProperties()
+ {
+ // Setup
+ var random = new Random(12);
+ double beta = random.NextDouble();
+ var windDirection = new WindDirection("", 0);
+ IEnumerable stochasts = Enumerable.Empty();
+
+ // Call
+ var generalResult = new GeneralResult(beta, windDirection, stochasts);
+
+ // Assert
+ Assert.AreEqual(beta, generalResult.Beta);
+ Assert.AreSame(windDirection, generalResult.GoverningWindirection);
+ Assert.AreSame(stochasts, generalResult.Stochasts);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -r1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9 -rb23df716dfc99572b230f5c5aca57d1eb8249089
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 1a7bbfc1520b96bab3d6d50f9e68da0b23ca0da9)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision b23df716dfc99572b230f5c5aca57d1eb8249089)
@@ -79,6 +79,7 @@
+