Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicLocationConfigurationSettings.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicLocationConfigurationSettings.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/HydraulicLocationConfigurationSettings.cs (revision a09830acfa5617cc5ece25e8f3ffe8b234255710)
@@ -0,0 +1,94 @@
+using System;
+
+namespace Ringtoets.Common.Data.Hydraulics {
+ ///
+ /// Class which holds information about the hydraulic
+ /// location configuration settings.
+ ///
+ public class HydraulicLocationConfigurationSettings
+ {
+ ///
+ /// Gets the scenario name.
+ ///
+ public string ScenarioName { get; private set; }
+
+ ///
+ /// Gets the year.
+ ///
+ public int Year { get; private set; }
+
+ ///
+ /// Gets the scope.
+ ///
+ public string Scope { get; private set; }
+
+ ///
+ /// Gets the sea level.
+ ///
+ public string SeaLevel { get; private set; }
+
+ ///
+ /// Gets the river discharge.
+ ///
+ public string RiverDischarge { get; private set; }
+
+ ///
+ /// Gets the lake level.
+ ///
+ public string LakeLevel { get; private set; }
+
+ ///
+ /// Gets the wind direction.
+ ///
+ public string WindDirection { get; private set; }
+
+ ///
+ /// Gets the wind speed.
+ ///
+ public string WindSpeed { get; private set; }
+
+ ///
+ /// Gets the comment.
+ ///
+ public string Comment { get; private set; }
+
+ ///
+ /// Sets values to the .
+ ///
+ /// The name of the scenario.
+ /// The year.
+ /// The scope.
+ /// The sea level.
+ /// The river discharge.
+ /// The lake level.
+ /// The wind direction.
+ /// The wind speed.
+ /// The comment.
+ /// Thrown when
+ /// or are null.
+ public void SetValues(string scenarioName, int year, string scope,
+ string seaLevel, string riverDischarge, string lakeLevel,
+ string windDirection, string windSpeed, string comment)
+ {
+ if (scenarioName == null)
+ {
+ throw new ArgumentNullException(nameof(scenarioName));
+ }
+
+ if (scope == null)
+ {
+ throw new ArgumentNullException(nameof(scope));
+ }
+
+ ScenarioName = scenarioName;
+ Year = year;
+ Scope = scope;
+ SeaLevel = seaLevel;
+ RiverDischarge = riverDischarge;
+ LakeLevel = lakeLevel;
+ WindDirection = windDirection;
+ WindSpeed = windSpeed;
+ Comment = comment;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -r1a75c0f703334eacfc82f695b38405ccb9313add -ra09830acfa5617cc5ece25e8f3ffe8b234255710
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 1a75c0f703334eacfc82f695b38405ccb9313add)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision a09830acfa5617cc5ece25e8f3ffe8b234255710)
@@ -62,6 +62,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicLocationConfigurationSettingsTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicLocationConfigurationSettingsTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Hydraulics/HydraulicLocationConfigurationSettingsTest.cs (revision a09830acfa5617cc5ece25e8f3ffe8b234255710)
@@ -0,0 +1,114 @@
+using System;
+using NUnit.Framework;
+using Ringtoets.Common.Data.Hydraulics;
+
+namespace Ringtoets.Common.Data.Test.Hydraulics
+{
+ [TestFixture]
+ public class HydraulicLocationConfigurationSettingsTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var settings = new HydraulicLocationConfigurationSettings();
+
+ // Assert
+ Assert.IsNull(settings.ScenarioName);
+ Assert.Zero(settings.Year);
+ Assert.IsNull(settings.Scope);
+ Assert.IsNull(settings.SeaLevel);
+ Assert.IsNull(settings.RiverDischarge);
+ Assert.IsNull(settings.LakeLevel);
+ Assert.IsNull(settings.WindDirection);
+ Assert.IsNull(settings.WindSpeed);
+ Assert.IsNull(settings.Comment);
+ }
+
+ [Test]
+ public void SetValues_ScenarioNameNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var random = new Random(21);
+ int year = random.Next();
+ const string scope = "Scope";
+ const string seaLevel = "SeaLevel";
+ const string riverDischarge = "RiverDischarge";
+ const string lakeLevel = "LakeLevel";
+ const string windDirection = "WindDirection";
+ const string windSpeed = "WindSpeed";
+ const string comment = "Comment";
+
+ var settings = new HydraulicLocationConfigurationSettings();
+
+ // Call
+ TestDelegate call = () => settings.SetValues(null, year, scope,
+ seaLevel, riverDischarge, lakeLevel,
+ windDirection, windSpeed, comment);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("scenarioName", exception.ParamName);
+ }
+
+ [Test]
+ public void SetValues_ScopeNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var random = new Random(21);
+ const string scenarioName = "ScenarioName";
+ int year = random.Next();
+ const string seaLevel = "SeaLevel";
+ const string riverDischarge = "RiverDischarge";
+ const string lakeLevel = "LakeLevel";
+ const string windDirection = "WindDirection";
+ const string windSpeed = "WindSpeed";
+ const string comment = "Comment";
+
+ var settings = new HydraulicLocationConfigurationSettings();
+
+ // Call
+ TestDelegate call = () => settings.SetValues(scenarioName, year, null,
+ seaLevel, riverDischarge, lakeLevel,
+ windDirection, windSpeed, comment);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("scope", exception.ParamName);
+ }
+
+ [Test]
+ public void SetValues_WithArguments_SetsExpectedValues()
+ {
+ // Setup
+ var random = new Random(21);
+ const string scenarioName = "ScenarioName";
+ int year = random.Next();
+ const string scope = "Scope";
+ const string seaLevel = "SeaLevel";
+ const string riverDischarge = "RiverDischarge";
+ const string lakeLevel = "LakeLevel";
+ const string windDirection = "WindDirection";
+ const string windSpeed = "WindSpeed";
+ const string comment = "Comment";
+
+ var settings = new HydraulicLocationConfigurationSettings();
+
+ // Call
+ settings.SetValues(scenarioName, year, scope,
+ seaLevel, riverDischarge, lakeLevel,
+ windDirection, windSpeed, comment);
+
+ // Assert
+ Assert.AreEqual(scenarioName, settings.ScenarioName);
+ Assert.AreEqual(year, settings.Year);
+ Assert.AreEqual(scope, settings.Scope);
+ Assert.AreEqual(seaLevel, settings.SeaLevel);
+ Assert.AreEqual(riverDischarge, settings.RiverDischarge);
+ Assert.AreEqual(lakeLevel, settings.LakeLevel);
+ Assert.AreEqual(windDirection, settings.WindDirection);
+ Assert.AreEqual(windSpeed, settings.WindSpeed);
+ Assert.AreEqual(comment, settings.Comment);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -r1a75c0f703334eacfc82f695b38405ccb9313add -ra09830acfa5617cc5ece25e8f3ffe8b234255710
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 1a75c0f703334eacfc82f695b38405ccb9313add)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision a09830acfa5617cc5ece25e8f3ffe8b234255710)
@@ -59,6 +59,7 @@
+