Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/Properties/AssemblyInfo.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r108f373d8a13de5f14a94d246fadab4068f78f76 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 108f373d8a13de5f14a94d246fadab4068f78f76) @@ -24,4 +24,5 @@ [assembly: AssemblyTitle("Ringtoets.HydraRing.IO")] [assembly: AssemblyProduct("Ringtoets.HydraRing.IO")] -[assembly: InternalsVisibleTo("Ringtoets.HydraRing.IO.Test")] \ No newline at end of file +[assembly: InternalsVisibleTo("Ringtoets.HydraRing.IO.Test")] +[assembly: InternalsVisibleTo("Ringtoets.HydraRing.IO.TestUtil")] \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/ReadHydraulicBoundaryDatabaseTestFactoryTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/ReadHydraulicBoundaryDatabaseTestFactoryTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/ReadHydraulicBoundaryDatabaseTestFactoryTest.cs (revision 108f373d8a13de5f14a94d246fadab4068f78f76) @@ -0,0 +1,53 @@ +// 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 Ringtoets.HydraRing.IO.HydraulicBoundaryDatabase; + +namespace Ringtoets.HydraRing.IO.TestUtil.Test +{ + [TestFixture] + public class ReadHydraulicBoundaryDatabaseTestFactoryTest + { + [Test] + public void Create_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.IsNotNull(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)); + } + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/Ringtoets.HydraRing.IO.TestUtil.Test.csproj =================================================================== diff -u -r8e6e288ada905cdf2db9b5a57f1b4f2ba718023d -r108f373d8a13de5f14a94d246fadab4068f78f76 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/Ringtoets.HydraRing.IO.TestUtil.Test.csproj (.../Ringtoets.HydraRing.IO.TestUtil.Test.csproj) (revision 8e6e288ada905cdf2db9b5a57f1b4f2ba718023d) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil.Test/Ringtoets.HydraRing.IO.TestUtil.Test.csproj (.../Ringtoets.HydraRing.IO.TestUtil.Test.csproj) (revision 108f373d8a13de5f14a94d246fadab4068f78f76) @@ -15,11 +15,22 @@ + Copying.licenseheader + + + {B69D5B6C-6E14-4FA9-9EBC-8F97678CDB70} + Ringtoets.HydraRing.IO + + + {7FB79768-1A8B-41CA-9614-8EC6C3C79482} + Ringtoets.HydraRing.IO.TestUtil + + \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil/ReadHydraulicBoundaryDatabaseTestFactory.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil/ReadHydraulicBoundaryDatabaseTestFactory.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil/ReadHydraulicBoundaryDatabaseTestFactory.cs (revision 108f373d8a13de5f14a94d246fadab4068f78f76) @@ -0,0 +1,47 @@ +// 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; +using Ringtoets.HydraRing.IO.HydraulicBoundaryDatabase; + +namespace Ringtoets.HydraRing.IO.TestUtil +{ + /// + /// Factory that creates simple instances + /// that can be used for testing. + /// + /// Creates a of with random values. + /// + /// The created . + public static ReadHydraulicBoundaryDatabase Create() + { + var random = new Random(21); + return new ReadHydraulicBoundaryDatabase(random.Next(), "version", new[] + { + new ReadHydraulicBoundaryLocation(random.Next(), "location1", random.NextDouble(), random.NextDouble()), + new ReadHydraulicBoundaryLocation(random.Next(), "location2", random.NextDouble(), random.NextDouble()) + }); + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil/Ringtoets.HydraRing.IO.TestUtil.csproj =================================================================== diff -u -r8e6e288ada905cdf2db9b5a57f1b4f2ba718023d -r108f373d8a13de5f14a94d246fadab4068f78f76 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil/Ringtoets.HydraRing.IO.TestUtil.csproj (.../Ringtoets.HydraRing.IO.TestUtil.csproj) (revision 8e6e288ada905cdf2db9b5a57f1b4f2ba718023d) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.TestUtil/Ringtoets.HydraRing.IO.TestUtil.csproj (.../Ringtoets.HydraRing.IO.TestUtil.csproj) (revision 108f373d8a13de5f14a94d246fadab4068f78f76) @@ -12,10 +12,17 @@ + Copying.licenseheader + + + {B69D5B6C-6E14-4FA9-9EBC-8F97678CDB70} + Ringtoets.HydraRing.IO + + \ No newline at end of file