Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResult.cs
===================================================================
diff -u -rb23df716dfc99572b230f5c5aca57d1eb8249089 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResult.cs (.../GeneralResult.cs) (revision b23df716dfc99572b230f5c5aca57d1eb8249089)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/GeneralResult.cs (.../GeneralResult.cs) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -35,9 +35,15 @@
/// 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)
+ /// A collections of all
+ /// the combinations of wind directions, closing situations and illustration
+ /// points.
+ /// Thrown when ,
+ /// or is null.
+ public GeneralResult(double beta,
+ WindDirection governingWindirection,
+ IEnumerable stochasts,
+ IEnumerable windDirectionClosingSituationIllustrationPoints)
{
if (governingWindirection == null)
{
@@ -47,25 +53,35 @@
{
throw new ArgumentNullException(nameof(stochasts));
}
+ if (windDirectionClosingSituationIllustrationPoints == null)
+ {
+ throw new ArgumentNullException(nameof(windDirectionClosingSituationIllustrationPoints));
+ }
Beta = beta;
GoverningWindirection = governingWindirection;
Stochasts = stochasts;
+ WindDirectionClosingIllustrationPoints = windDirectionClosingSituationIllustrationPoints;
}
///
- /// Gets or sets the general beta value.
+ /// Gets the general beta value.
///
public double Beta { get; }
///
- /// Gets or sets the governing wind direction.
+ /// Gets the governing wind direction.
///
public WindDirection GoverningWindirection { get; }
///
- /// Gets or sets the general alpha values.
+ /// Gets the general alpha values.
///
- public IEnumerable Stochasts { get; }
+ public IEnumerable Stochasts { get; }
+
+ ///
+ /// Gets
+ ///
+ public IEnumerable WindDirectionClosingIllustrationPoints { get; }
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/WindDirectionClosingScenarioIllustrationPoint.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/WindDirectionClosingScenarioIllustrationPoint.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/IllustrationPoints/WindDirectionClosingScenarioIllustrationPoint.cs (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -0,0 +1,75 @@
+// 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.Common.Data.Hydraulics.IllustrationPoints
+{
+ ///
+ /// Combination of , closing situation and
+ /// .
+ ///
+ public class WindDirectionClosingScenarioIllustrationPoint
+ {
+ ///
+ /// Creates an instance of .
+ ///
+ /// The wind direction.
+ /// The closing situation.
+ /// The illustrationPoint.
+ public WindDirectionClosingScenarioIllustrationPoint(WindDirection windDirection,
+ string closingSituation,
+ IllustrationPoint illustrationPoint)
+ {
+ if (windDirection == null)
+ {
+ throw new ArgumentNullException(nameof(windDirection));
+ }
+ if (closingSituation == null)
+ {
+ throw new ArgumentNullException(nameof(closingSituation));
+ }
+ if (illustrationPoint == null)
+ {
+ throw new ArgumentNullException(nameof(illustrationPoint));
+ }
+
+ WindDirection = windDirection;
+ ClosingSituation = closingSituation;
+ IllustrationPoint = illustrationPoint;
+ }
+
+ ///
+ /// Gets the closing situation.
+ ///
+ public string ClosingSituation { get; }
+
+ ///
+ /// Gets the wind direction.
+ ///
+ public WindDirection WindDirection { get; }
+
+ ///
+ /// Gets the illustration point.
+ ///
+ public IllustrationPoint IllustrationPoint { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -rb23df716dfc99572b230f5c5aca57d1eb8249089 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision b23df716dfc99572b230f5c5aca57d1eb8249089)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -74,6 +74,7 @@
+
Index: Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultConverter.cs
===================================================================
diff -u -r2e41076ad79396a23233e6f483eb16019f5d3460 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultConverter.cs (.../GeneralResultConverter.cs) (revision 2e41076ad79396a23233e6f483eb16019f5d3460)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/IllustrationPoints/GeneralResultConverter.cs (.../GeneralResultConverter.cs) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -49,7 +49,11 @@
WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraGeneralResult.GoverningWind);
IEnumerable stochasts = GetStochasts(hydraGeneralResult);
- return new GeneralResult(hydraGeneralResult.Beta, windDirection, stochasts);
+ // TODO WTI-1303: Write converter
+ IEnumerable windDirectionClosingScenarioIllustrationPoints =
+ Enumerable.Empty();
+
+ return new GeneralResult(hydraGeneralResult.Beta, windDirection, stochasts, windDirectionClosingScenarioIllustrationPoints);
}
private static IEnumerable GetStochasts(HydraGeneralResult hydraGeneralResult)
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs
===================================================================
diff -u -ref75a2d8ecfda6d981fc26de5425ac5744359a45 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs (.../HydraulicBoundaryLocationOutputTest.cs) (revision ef75a2d8ecfda6d981fc26de5425ac5744359a45)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicBoundaryLocationOutputTest.cs (.../HydraulicBoundaryLocationOutputTest.cs) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -132,7 +132,8 @@
double beta = random.NextDouble();
var generalResult = new GeneralResult(beta,
windDirection,
- Enumerable.Empty());
+ Enumerable.Empty(),
+ Enumerable.Empty());
// Call
var output = new HydraulicBoundaryLocationOutput(result, targetProbability,
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultTest.cs
===================================================================
diff -u -ra05010135dfc0fae86946bddd4f8891a07206938 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultTest.cs (.../GeneralResultTest.cs) (revision a05010135dfc0fae86946bddd4f8891a07206938)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/GeneralResultTest.cs (.../GeneralResultTest.cs) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -24,7 +24,7 @@
using System.Linq;
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics.IllustrationPoints;
-using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.Data.TestUtil.IllustrationPoints;
namespace Ringtoets.Common.Data.Test.Hydraulics.IllustrationPoints
{
@@ -35,7 +35,10 @@
public void Constructor_WindDirectionNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate call = () => new GeneralResult(0, null, Enumerable.Empty());
+ TestDelegate call = () => new GeneralResult(0,
+ null,
+ Enumerable.Empty(),
+ Enumerable.Empty());
// Assert
string paramName = Assert.Throws(call).ParamName;
@@ -49,29 +52,52 @@
var windDirection = new TestWindDirection();
// Call
- TestDelegate call = () => new GeneralResult(0, windDirection, null);
+ TestDelegate call = () => new GeneralResult(0,
+ windDirection,
+ null,
+ Enumerable.Empty());
// Assert
string paramName = Assert.Throws(call).ParamName;
Assert.AreEqual("stochasts", paramName);
}
[Test]
+ public void Constructor_WindDirectionClosingScenarioIllustrationPointsNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var windDirection = new TestWindDirection();
+
+ // Call
+ TestDelegate call = () => new GeneralResult(0,
+ windDirection,
+ Enumerable.Empty(),
+ null);
+
+ // Assert
+ string paramName = Assert.Throws(call).ParamName;
+ Assert.AreEqual("windDirectionClosingScenarioIllustrationPoints", paramName);
+ }
+
+ [Test]
public void Constructor_ValidArguments_ExpectedProperties()
{
// Setup
var random = new Random(12);
double beta = random.NextDouble();
var windDirection = new TestWindDirection();
IEnumerable stochasts = Enumerable.Empty();
+ IEnumerable combinations =
+ Enumerable.Empty();
// Call
- var generalResult = new GeneralResult(beta, windDirection, stochasts);
+ var generalResult = new GeneralResult(beta, windDirection, stochasts, combinations);
// Assert
Assert.AreEqual(beta, generalResult.Beta);
Assert.AreSame(windDirection, generalResult.GoverningWindirection);
Assert.AreSame(stochasts, generalResult.Stochasts);
+ Assert.AreSame(combinations, generalResult.WindDirectionClosingIllustrationPoints);
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/WindDirectionClosingScenarioIllustrationPointTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/WindDirectionClosingScenarioIllustrationPointTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/IllustrationPoints/WindDirectionClosingScenarioIllustrationPointTest.cs (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -0,0 +1,96 @@
+// 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.Common.Data.Hydraulics.IllustrationPoints;
+using Ringtoets.Common.Data.TestUtil.IllustrationPoints;
+
+namespace Ringtoets.Common.Data.Test.Hydraulics.IllustrationPoints
+{
+ [TestFixture]
+ public class WindDirectionClosingScenarioIllustrationPointTest
+ {
+ [Test]
+ public void Constructor_WindDirectionNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var illustrationPoint = new TestIllustrationPoint();
+
+ // Call
+ TestDelegate call = () =>
+ new WindDirectionClosingScenarioIllustrationPoint(null, "closing situation", illustrationPoint);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("windDirection", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_ClosingSituationNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var windDirection = new TestWindDirection();
+ var illustrationPoint = new TestIllustrationPoint();
+
+ // Call
+ TestDelegate call = () =>
+ new WindDirectionClosingScenarioIllustrationPoint(windDirection, null, illustrationPoint);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("closingSituation", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_IllustationPointNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var windDirection = new TestWindDirection();
+
+ // Call
+ TestDelegate call = () =>
+ new WindDirectionClosingScenarioIllustrationPoint(windDirection, "closing situation", null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("illustrationPoint", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_ValidArguments_ReturnsExpectedProperties()
+ {
+ // Setup
+ const string closingSituation = "closing situation";
+ var windDirection = new TestWindDirection();
+ var illustrationPoint = new TestIllustrationPoint();
+
+ // Call
+ var windDirectionClosingScenarioIllustrationPoint =
+ new WindDirectionClosingScenarioIllustrationPoint(windDirection, closingSituation, illustrationPoint);
+
+ // Assert
+ Assert.AreEqual(closingSituation, windDirectionClosingScenarioIllustrationPoint.ClosingSituation);
+ Assert.AreSame(windDirection, windDirectionClosingScenarioIllustrationPoint.WindDirection);
+ Assert.AreSame(illustrationPoint, windDirectionClosingScenarioIllustrationPoint.IllustrationPoint);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -rb23df716dfc99572b230f5c5aca57d1eb8249089 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision b23df716dfc99572b230f5c5aca57d1eb8249089)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -84,6 +84,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestIllustrationPointTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestIllustrationPointTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/IllustrationPoints/TestIllustrationPointTest.cs (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -0,0 +1,46 @@
+// 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 NUnit.Framework;
+using Ringtoets.Common.Data.Hydraulics.IllustrationPoints;
+using Ringtoets.Common.Data.TestUtil.IllustrationPoints;
+
+namespace Ringtoets.Common.Data.TestUtil.Test.IllustrationPoints
+{
+ [TestFixture]
+ public class TestIllustrationPointTest
+ {
+ [Test]
+ public void DefaultConstructor_Test()
+ {
+ // Call
+ var illustrationPoint = new TestIllustrationPoint();
+
+ // Assert
+ Assert.IsInstanceOf(illustrationPoint);
+
+ Assert.AreEqual("Illustration Point", illustrationPoint.Name);
+ CollectionAssert.IsEmpty(illustrationPoint.Stochasts);
+ CollectionAssert.IsEmpty(illustrationPoint.IllustrationPointResults);
+ Assert.AreEqual(3.14, illustrationPoint.Beta, illustrationPoint.Beta.GetAccuracy());
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj
===================================================================
diff -u -ra05010135dfc0fae86946bddd4f8891a07206938 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision a05010135dfc0fae86946bddd4f8891a07206938)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/Ringtoets.Common.Data.TestUtil.Test.csproj (.../Ringtoets.Common.Data.TestUtil.Test.csproj) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -68,6 +68,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestWindDirectionTest.cs
===================================================================
diff -u -ra05010135dfc0fae86946bddd4f8891a07206938 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestWindDirectionTest.cs (.../TestWindDirectionTest.cs) (revision a05010135dfc0fae86946bddd4f8891a07206938)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestWindDirectionTest.cs (.../TestWindDirectionTest.cs) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -21,6 +21,7 @@
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics.IllustrationPoints;
+using Ringtoets.Common.Data.TestUtil.IllustrationPoints;
namespace Ringtoets.Common.Data.TestUtil.Test
{
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestIllustrationPoint.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestIllustrationPoint.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestIllustrationPoint.cs (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -0,0 +1,38 @@
+// 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.Linq;
+using Ringtoets.Common.Data.Hydraulics.IllustrationPoints;
+
+namespace Ringtoets.Common.Data.TestUtil.IllustrationPoints
+{
+ ///
+ /// A simple illustration point which can be used for testing.
+ ///
+ public class TestIllustrationPoint : IllustrationPoint
+ {
+ ///
+ /// Creates a .
+ ///
+ public TestIllustrationPoint()
+ : base("Illustration Point", Enumerable.Empty(), Enumerable.Empty(), 3.14) {}
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestWindDirection.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestWindDirection.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/IllustrationPoints/TestWindDirection.cs (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -0,0 +1,36 @@
+// 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 Ringtoets.Common.Data.Hydraulics.IllustrationPoints;
+
+namespace Ringtoets.Common.Data.TestUtil.IllustrationPoints
+{
+ ///
+ /// Simple wind direction which can be used for testing.
+ ///
+ public class TestWindDirection : WindDirection
+ {
+ ///
+ /// Creates a new instance of
+ ///
+ public TestWindDirection() : base("SSE", 5.0) {}
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj
===================================================================
diff -u -ra05010135dfc0fae86946bddd4f8891a07206938 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision a05010135dfc0fae86946bddd4f8891a07206938)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/Ringtoets.Common.Data.TestUtil.csproj (.../Ringtoets.Common.Data.TestUtil.csproj) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -58,6 +58,7 @@
+
@@ -73,7 +74,7 @@
-
+
Fisheye: Tag f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestWindDirection.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/IllustrationPoints/WindDirectionClosingSituation.cs
===================================================================
diff -u -r6d67c42595915b7385a6cf2f13885abc9ed1fad0 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/IllustrationPoints/WindDirectionClosingSituation.cs (.../WindDirectionClosingSituation.cs) (revision 6d67c42595915b7385a6cf2f13885abc9ed1fad0)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Parsers/IllustrationPoints/WindDirectionClosingSituation.cs (.../WindDirectionClosingSituation.cs) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -28,9 +28,6 @@
///
public class WindDirectionClosingSituation
{
- private readonly WindDirection windDirection;
- private readonly string closingSituation;
-
///
/// Creates a new instance of .
///
@@ -48,10 +45,21 @@
{
throw new ArgumentNullException(nameof(closingSituation));
}
- this.windDirection = windDirection;
- this.closingSituation = closingSituation;
+
+ WindDirection = windDirection;
+ ClosingSituation = closingSituation;
}
+ ///
+ /// Gets the closing situation.
+ ///
+ public string ClosingSituation { get; }
+
+ ///
+ /// Gets the wind direction.
+ ///
+ public WindDirection WindDirection { get; }
+
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj))
@@ -69,14 +77,14 @@
{
unchecked
{
- return (windDirection.GetHashCode() * 397) ^ closingSituation.GetHashCode();
+ return (WindDirection.GetHashCode() * 397) ^ ClosingSituation.GetHashCode();
}
}
private bool Equals(WindDirectionClosingSituation other)
{
- return Equals(windDirection, other.windDirection)
- && string.Equals(closingSituation, other.closingSituation);
+ return Equals(WindDirection, other.WindDirection)
+ && string.Equals(ClosingSituation, other.ClosingSituation);
}
}
}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/IllustrationPoints/WindDirectionClosingSituationTest.cs
===================================================================
diff -u -r6d67c42595915b7385a6cf2f13885abc9ed1fad0 -rf1e6b4ad5dddc6e771288f17a0b619d6dd23ec07
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/IllustrationPoints/WindDirectionClosingSituationTest.cs (.../WindDirectionClosingSituationTest.cs) (revision 6d67c42595915b7385a6cf2f13885abc9ed1fad0)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/IllustrationPoints/WindDirectionClosingSituationTest.cs (.../WindDirectionClosingSituationTest.cs) (revision f1e6b4ad5dddc6e771288f17a0b619d6dd23ec07)
@@ -62,6 +62,8 @@
// Assert
Assert.NotNull(instance);
+ Assert.AreEqual(closingSituation, instance.ClosingSituation);
+ Assert.AreSame(windDirection, instance.WindDirection);
}
[Test]