Index: Riskeer/Storage/src/Riskeer.Storage.Core/Read/DuneErosion/DuneLocationEntityReadExtensions.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r1afcd071cc3a6090f0b0a24790e58b3a631d28d2 --- Riskeer/Storage/src/Riskeer.Storage.Core/Read/DuneErosion/DuneLocationEntityReadExtensions.cs (.../DuneLocationEntityReadExtensions.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Storage/src/Riskeer.Storage.Core/Read/DuneErosion/DuneLocationEntityReadExtensions.cs (.../DuneLocationEntityReadExtensions.cs) (revision 1afcd071cc3a6090f0b0a24790e58b3a631d28d2) @@ -21,6 +21,7 @@ using System; using Core.Common.Base.Geometry; +using Riskeer.Common.Data.Hydraulics; using Riskeer.DuneErosion.Data; using Riskeer.Storage.Core.DbContext; @@ -56,8 +57,8 @@ return collector.Get(entity); } - var duneLocation = new DuneLocation(entity.LocationId, entity.Name, - new Point2D(entity.LocationX.ToNullAsNaN(), entity.LocationY.ToNullAsNaN()), + var duneLocation = new DuneLocation(entity.Name, + new HydraulicBoundaryLocation(entity.LocationId, string.Empty, entity.LocationX.ToNullAsNaN(), entity.LocationY.ToNullAsNaN()), new DuneLocation.ConstructionProperties { CoastalAreaId = entity.CoastalAreaId, Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/DuneErosion/DuneLocationCreateExtensionsTest.cs =================================================================== diff -u -r9e9976818f1b446948c3bf815cafe2e023f98ac1 -r1afcd071cc3a6090f0b0a24790e58b3a631d28d2 --- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/DuneErosion/DuneLocationCreateExtensionsTest.cs (.../DuneLocationCreateExtensionsTest.cs) (revision 9e9976818f1b446948c3bf815cafe2e023f98ac1) +++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/DuneErosion/DuneLocationCreateExtensionsTest.cs (.../DuneLocationCreateExtensionsTest.cs) (revision 1afcd071cc3a6090f0b0a24790e58b3a631d28d2) @@ -20,8 +20,8 @@ // All rights reserved. using System; -using Core.Common.Base.Geometry; using NUnit.Framework; +using Riskeer.Common.Data.Hydraulics; using Riskeer.Common.Data.TestUtil; using Riskeer.DuneErosion.Data; using Riskeer.DuneErosion.Data.TestUtil; @@ -38,10 +38,10 @@ public void Create_DuneLocationNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => ((DuneLocation) null).Create(new PersistenceRegistry(), 0); + void Call() => ((DuneLocation) null).Create(new PersistenceRegistry(), 0); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("location", exception.ParamName); } @@ -52,11 +52,11 @@ var location = new TestDuneLocation(); // Call - TestDelegate test = () => location.Create(null, 0); + void Call() => location.Create(null, 0); // Assert - string parameterName = Assert.Throws(test).ParamName; - Assert.AreEqual("registry", parameterName); + var exception = Assert.Throws(Call); + Assert.AreEqual("registry", exception.ParamName); } [Test] @@ -71,7 +71,7 @@ int order = random.Next(); var registry = new PersistenceRegistry(); - var location = new DuneLocation(id, testName, new Point2D(coordinateX, coordinateY), + var location = new DuneLocation(testName, new HydraulicBoundaryLocation(id, string.Empty, coordinateX, coordinateY), new DuneLocation.ConstructionProperties { CoastalAreaId = random.Next(), @@ -105,7 +105,7 @@ int order = random.Next(); var registry = new PersistenceRegistry(); - var location = new DuneLocation(id, string.Empty, new Point2D(double.NaN, double.NaN), + var location = new DuneLocation(string.Empty, new HydraulicBoundaryLocation(id, string.Empty, double.NaN, double.NaN), new DuneLocation.ConstructionProperties { Offset = double.NaN, @@ -133,7 +133,8 @@ { // Setup const string testName = "original name"; - var location = new DuneLocation(1, testName, new Point2D(0, 0), new DuneLocation.ConstructionProperties()); + var location = new DuneLocation(testName, new HydraulicBoundaryLocation(1, string.Empty, 0, 0), + new DuneLocation.ConstructionProperties()); var registry = new PersistenceRegistry(); // Call