Index: Ringtoets.sln
===================================================================
diff -u -rec65c0f71d4f917214bd39da7a554629cfbb0dab -ra046fea6f63159a53e0853024aab444645e48e25
--- Ringtoets.sln (.../Ringtoets.sln) (revision ec65c0f71d4f917214bd39da7a554629cfbb0dab)
+++ Ringtoets.sln (.../Ringtoets.sln) (revision a046fea6f63159a53e0853024aab444645e48e25)
@@ -2032,7 +2032,7 @@
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.HydraRing.IO.TestUtil.Test", "Ringtoets\HydraRing\test\Ringtoets.HydraRing.IO.TestUtil.Test\Riskeer.HydraRing.IO.TestUtil.Test.csproj", "{12B27394-C1AC-4B59-BD49-1662525B91C7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.HydraRing.IO.TestUtil.Test", "Ringtoets\HydraRing\test\Riskeer.HydraRing.IO.TestUtil.Test\Riskeer.HydraRing.IO.TestUtil.Test.csproj", "{12B27394-C1AC-4B59-BD49-1662525B91C7}"
ProjectSection(ProjectDependencies) = postProject
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
Fisheye: Tag a046fea6f63159a53e0853024aab444645e48e25 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/Properties/AssemblyInfo.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a046fea6f63159a53e0853024aab444645e48e25 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/ReadHydraulicBoundaryDatabaseTestFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a046fea6f63159a53e0853024aab444645e48e25 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseSettingsTestFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a046fea6f63159a53e0853024aab444645e48e25 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseTestFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a046fea6f63159a53e0853024aab444645e48e25 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/Riskeer.HydraRing.IO.TestUtil.Test.csproj'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a046fea6f63159a53e0853024aab444645e48e25 refers to a dead (removed) revision in file `Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/packages.config'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/Properties/AssemblyInfo.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/Properties/AssemblyInfo.cs (revision a046fea6f63159a53e0853024aab444645e48e25)
@@ -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.IO.TestUtil.Test")]
+[assembly: AssemblyProduct("Riskeer.HydraRing.IO.TestUtil.Test")]
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicBoundaryDatabaseTestFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicBoundaryDatabaseTestFactoryTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicBoundaryDatabaseTestFactoryTest.cs (revision a046fea6f63159a53e0853024aab444645e48e25)
@@ -0,0 +1,69 @@
+// 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.IO.HydraulicBoundaryDatabase;
+
+namespace Riskeer.HydraRing.IO.TestUtil.Test
+{
+ [TestFixture]
+ public class ReadHydraulicBoundaryDatabaseTestFactoryTest
+ {
+ [Test]
+ public void Create_WithoutLocations_ExpectedValues()
+ {
+ // Call
+ ReadHydraulicBoundaryDatabase readDatabase = ReadHydraulicBoundaryDatabaseTestFactory.Create();
+
+ // Assert
+ Assert.IsNotNull(readDatabase.TrackId);
+ Assert.AreEqual("version", readDatabase.Version);
+
+ ReadHydraulicBoundaryLocation[] locations = readDatabase.Locations.ToArray();
+ Assert.AreEqual(2, locations.Length);
+
+ for (var i = 0; i < locations.Length; i++)
+ {
+ Assert.AreEqual(i+1, locations[i].Id);
+ Assert.AreEqual($"location{i+1}", locations[i].Name);
+ Assert.IsFalse(double.IsNaN(locations[i].CoordinateX));
+ Assert.IsFalse(double.IsNaN(locations[i].CoordinateY));
+ }
+ }
+
+ [Test]
+ public void Create_WithLocations_ExpectedValues()
+ {
+ // Setup
+ IEnumerable locations = Enumerable.Empty();
+
+ // Call
+ ReadHydraulicBoundaryDatabase readDatabase = ReadHydraulicBoundaryDatabaseTestFactory.Create(locations);
+
+ // Assert
+ Assert.AreNotEqual(0, readDatabase.TrackId);
+ Assert.AreEqual("version", readDatabase.Version);
+ Assert.AreSame(locations, readDatabase.Locations);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseSettingsTestFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseSettingsTestFactoryTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseSettingsTestFactoryTest.cs (revision a046fea6f63159a53e0853024aab444645e48e25)
@@ -0,0 +1,48 @@
+// 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.IO.HydraulicLocationConfigurationDatabase;
+
+namespace Riskeer.HydraRing.IO.TestUtil.Test
+{
+ [TestFixture]
+ public class ReadHydraulicLocationConfigurationDatabaseSettingsTestFactoryTest
+ {
+ [Test]
+ public void Create_Always_ExpectedValues()
+ {
+ // Call
+ ReadHydraulicLocationConfigurationDatabaseSettings settings = ReadHydraulicLocationConfigurationDatabaseSettingsTestFactory.Create();
+
+ // Assert
+ Assert.AreEqual("scenarioName", settings.ScenarioName);
+ Assert.AreEqual(1337, 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/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseTestFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseTestFactoryTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/ReadHydraulicLocationConfigurationDatabaseTestFactoryTest.cs (revision a046fea6f63159a53e0853024aab444645e48e25)
@@ -0,0 +1,126 @@
+// 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.IO.HydraulicLocationConfigurationDatabase;
+
+namespace Riskeer.HydraRing.IO.TestUtil.Test
+{
+ [TestFixture]
+ public class ReadHydraulicLocationConfigurationDatabaseTestFactoryTest
+ {
+ [Test]
+ public void Create_ExpectedValues()
+ {
+ // Call
+ ReadHydraulicLocationConfigurationDatabase database = ReadHydraulicLocationConfigurationDatabaseTestFactory.Create();
+
+ // Assert
+ Assert.AreEqual(2, database.LocationIdMappings.Count());
+ Assert.IsNull(database.ReadHydraulicLocationConfigurationDatabaseSettings);
+
+ var i = 1;
+ foreach (ReadHydraulicLocationMapping databaseLocationIdMapping in database.LocationIdMappings)
+ {
+ Assert.AreEqual(i, databaseLocationIdMapping.HrdLocationId);
+ Assert.AreEqual(i + 100, databaseLocationIdMapping.HlcdLocationId);
+ i++;
+ }
+ }
+
+ [Test]
+ public void Create_WithLocationIds_ExpectedValues()
+ {
+ // Setup
+ var locationsIds = new long[]
+ {
+ 4,
+ 6,
+ 8
+ };
+
+ // Call
+ ReadHydraulicLocationConfigurationDatabase database = ReadHydraulicLocationConfigurationDatabaseTestFactory.Create(locationsIds);
+
+ // Assert
+ Assert.AreEqual(locationsIds.Length, database.LocationIdMappings.Count());
+ Assert.IsNull(database.ReadHydraulicLocationConfigurationDatabaseSettings);
+
+ var i = 0;
+ foreach (ReadHydraulicLocationMapping databaseLocationIdMapping in database.LocationIdMappings)
+ {
+ Assert.AreEqual(locationsIds[i], databaseLocationIdMapping.HrdLocationId);
+ Assert.AreEqual(locationsIds[i] + 100, databaseLocationIdMapping.HlcdLocationId);
+ i++;
+ }
+ }
+
+ [Test]
+ public void CreateWithConfigurationSettings_ExpectedValues()
+ {
+ // Call
+ ReadHydraulicLocationConfigurationDatabase database = ReadHydraulicLocationConfigurationDatabaseTestFactory.CreateWithConfigurationSettings();
+
+ // Assert
+ var i = 1;
+ foreach (ReadHydraulicLocationMapping databaseLocationIdMapping in database.LocationIdMappings)
+ {
+ Assert.AreEqual(i, databaseLocationIdMapping.HrdLocationId);
+ Assert.AreEqual(i + 100, databaseLocationIdMapping.HlcdLocationId);
+ i++;
+ }
+
+ ReadHydraulicLocationConfigurationDatabaseSettings setting = database.ReadHydraulicLocationConfigurationDatabaseSettings.Single();
+ Assert.AreEqual("scenarioName", setting.ScenarioName);
+ Assert.AreEqual(1337, setting.Year);
+ Assert.AreEqual("scope", setting.Scope);
+ Assert.AreEqual("seaLevel", setting.SeaLevel);
+ Assert.AreEqual("riverDischarge", setting.RiverDischarge);
+ Assert.AreEqual("lakeLevel", setting.LakeLevel);
+ Assert.AreEqual("windDirection", setting.WindDirection);
+ Assert.AreEqual("windSpeed", setting.WindSpeed);
+ Assert.AreEqual("comment", setting.Comment);
+ }
+
+ [Test]
+ public void CreateWithConfigurationSettings_WithReadHydraulicLocationConfigurationDatabaseSettings_ExpectedValues()
+ {
+ // Setup
+ IEnumerable settings = Enumerable.Empty();
+
+ // Call
+ ReadHydraulicLocationConfigurationDatabase database = ReadHydraulicLocationConfigurationDatabaseTestFactory.CreateWithConfigurationSettings(settings);
+
+ // Assert
+ var i = 1;
+ foreach (ReadHydraulicLocationMapping databaseLocationIdMapping in database.LocationIdMappings)
+ {
+ Assert.AreEqual(i, databaseLocationIdMapping.HrdLocationId);
+ Assert.AreEqual(i + 100, databaseLocationIdMapping.HlcdLocationId);
+ i++;
+ }
+
+ Assert.AreSame(settings, database.ReadHydraulicLocationConfigurationDatabaseSettings);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/Riskeer.HydraRing.IO.TestUtil.Test.csproj
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/Riskeer.HydraRing.IO.TestUtil.Test.csproj (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/Riskeer.HydraRing.IO.TestUtil.Test.csproj (revision a046fea6f63159a53e0853024aab444645e48e25)
@@ -0,0 +1,38 @@
+
+
+
+ {12B27394-C1AC-4B59-BD49-1662525B91C7}
+ Riskeer.HydraRing.IO.TestUtil.Test
+ Riskeer.HydraRing.IO.TestUtil.Test
+
+
+
+
+ ..\..\..\..\packages\NUnit.3.8.1\lib\net40\nunit.framework.dll
+
+
+
+
+
+
+
+
+
+
+
+
+ Copying.licenseheader
+
+
+
+
+
+ {B69D5B6C-6E14-4FA9-9EBC-8F97678CDB70}
+ Riskeer.HydraRing.IO
+
+
+ {7FB79768-1A8B-41CA-9614-8EC6C3C79482}
+ Riskeer.HydraRing.IO.TestUtil
+
+
+
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/packages.config
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/packages.config (revision 0)
+++ Ringtoets/HydraRing/test/Riskeer.HydraRing.IO.TestUtil.Test/packages.config (revision a046fea6f63159a53e0853024aab444645e48e25)
@@ -0,0 +1,26 @@
+
+
+
+
+
\ No newline at end of file