Fisheye: Tag bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ReadHydraulicBoundaryLocation.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj =================================================================== diff -u -r9636fed8699dd78289ce53a742317e75f6354f96 -rbf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9 --- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 9636fed8699dd78289ce53a742317e75f6354f96) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9) @@ -56,7 +56,6 @@ - Fisheye: Tag bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/ReadHydraulicBoundaryLocationTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj =================================================================== diff -u -r9636fed8699dd78289ce53a742317e75f6354f96 -rbf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 9636fed8699dd78289ce53a742317e75f6354f96) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9) @@ -57,7 +57,6 @@ - Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/HydraulicBoundaryDatabaseContext/ReadHydraulicBoundaryLocation.cs =================================================================== diff -u --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/HydraulicBoundaryDatabaseContext/ReadHydraulicBoundaryLocation.cs (revision 0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/HydraulicBoundaryDatabaseContext/ReadHydraulicBoundaryLocation.cs (revision bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9) @@ -0,0 +1,72 @@ +// 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.HydraRing.IO.HydraulicBoundaryDatabaseContext +{ + /// + /// Location that is read from a hydraulic boundary database file. + /// + public class ReadHydraulicBoundaryLocation + { + /// + /// Creates a new instance of . + /// + /// The database id of the read hydraulic boundary location. + /// The name of the read hydraulic boundary location. + /// The x coordinate of the read hydraulic boundary location. + /// The y coordinate of the read hydraulic boundary location. + /// Thrown when is null. + public ReadHydraulicBoundaryLocation(long id, string name, double coordinateX, double coordinateY) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Id = id; + Name = name; + CoordinateX = coordinateX; + CoordinateY = coordinateY; + } + + /// + /// Gets the database id of the read hydraulic boundary location. + /// + public long Id { get; } + + /// + /// Gets the name of the read hydraulic boundary location. + /// + public string Name { get; } + + /// + /// Gets the x coordinate of the read hydraulic boundary location. + /// + public double CoordinateX { get; } + + /// + /// Gets the y coordinate of the read hydraulic boundary location. + /// + public double CoordinateY { get; } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/Ringtoets.HydraRing.IO.csproj =================================================================== diff -u -r6ce47c27ad8dc0e84fdb290be480f5f66b61d8be -rbf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/Ringtoets.HydraRing.IO.csproj (.../Ringtoets.HydraRing.IO.csproj) (revision 6ce47c27ad8dc0e84fdb290be480f5f66b61d8be) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.IO/Ringtoets.HydraRing.IO.csproj (.../Ringtoets.HydraRing.IO.csproj) (revision bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9) @@ -28,6 +28,7 @@ + Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/HydraulicBoundaryDatabaseContext/ReadHydraulicBoundaryLocationTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/HydraulicBoundaryDatabaseContext/ReadHydraulicBoundaryLocationTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/HydraulicBoundaryDatabaseContext/ReadHydraulicBoundaryLocationTest.cs (revision bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9) @@ -0,0 +1,62 @@ +// 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.HydraRing.IO.HydraulicBoundaryDatabaseContext; + +namespace Ringtoets.HydraRing.IO.Test.HydraulicBoundaryDatabaseContext +{ + [TestFixture] + public class ReadHydraulicBoundaryLocationTest + { + [Test] + public void Constructor_NameNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new ReadHydraulicBoundaryLocation(1, null, 2, 3); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("name", paramName); + } + + [Test] + public void Constructor_Always_ExpectedValues() + { + // Setup + const long id = 1; + const string name = "name"; + var random = new Random(11); + double xCoordinate = random.NextDouble(); + double yCoordinate = random.NextDouble(); + + // Call + var readHydraulicBoundaryLocation = new ReadHydraulicBoundaryLocation(id, name, xCoordinate, yCoordinate); + + // Assert + Assert.AreEqual(id, readHydraulicBoundaryLocation.Id); + Assert.AreEqual(name, readHydraulicBoundaryLocation.Name); + Assert.AreEqual(xCoordinate, readHydraulicBoundaryLocation.CoordinateX); + Assert.AreEqual(yCoordinate, readHydraulicBoundaryLocation.CoordinateY); + } + } +} \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/Ringtoets.HydraRing.IO.Test.csproj =================================================================== diff -u -r5f5f390118dd161593e37f385a5da7d455c12947 -rbf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/Ringtoets.HydraRing.IO.Test.csproj (.../Ringtoets.HydraRing.IO.Test.csproj) (revision 5f5f390118dd161593e37f385a5da7d455c12947) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/Ringtoets.HydraRing.IO.Test.csproj (.../Ringtoets.HydraRing.IO.Test.csproj) (revision bf02b4dc139679e0c7a89d2a6bcd71ace25fa7b9) @@ -22,6 +22,7 @@ +