Index: Riskeer/DuneErosion/src/Riskeer.DuneErosion.Data/DuneLocation.cs
===================================================================
diff -u -rc657c1124d87ec256c10ea111c5a37ce9deb55d5 -r44a03ef40419e0b6836311eddbed21de8b99b95e
--- Riskeer/DuneErosion/src/Riskeer.DuneErosion.Data/DuneLocation.cs (.../DuneLocation.cs) (revision c657c1124d87ec256c10ea111c5a37ce9deb55d5)
+++ Riskeer/DuneErosion/src/Riskeer.DuneErosion.Data/DuneLocation.cs (.../DuneLocation.cs) (revision 44a03ef40419e0b6836311eddbed21de8b99b95e)
@@ -56,19 +56,23 @@
throw new ArgumentNullException(nameof(properties));
}
- Id = hydraulicBoundaryLocation.Id;
+ HydraulicBoundaryLocation = hydraulicBoundaryLocation;
Name = name;
- Location = hydraulicBoundaryLocation.Location;
CoastalAreaId = properties.CoastalAreaId;
Offset = new RoundedDouble(1, properties.Offset);
Orientation = new RoundedDouble(1, properties.Orientation);
D50 = new RoundedDouble(6, properties.D50);
}
///
+ /// Gets the that belongs to this dune location.
+ ///
+ public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; }
+
+ ///
/// Gets the database id of the dune location.
///
- public long Id { get; }
+ public long Id => HydraulicBoundaryLocation.Id;
///
/// Gets the name of the dune location.
@@ -78,7 +82,7 @@
///
/// Gets the coordinate of the dune location.
///
- public Point2D Location { get; }
+ public Point2D Location => HydraulicBoundaryLocation.Location;
///
/// Gets the coastal area id of the dune location.
Index: Riskeer/DuneErosion/test/Riskeer.DuneErosion.Data.Test/DuneLocationTest.cs
===================================================================
diff -u -rc657c1124d87ec256c10ea111c5a37ce9deb55d5 -r44a03ef40419e0b6836311eddbed21de8b99b95e
--- Riskeer/DuneErosion/test/Riskeer.DuneErosion.Data.Test/DuneLocationTest.cs (.../DuneLocationTest.cs) (revision c657c1124d87ec256c10ea111c5a37ce9deb55d5)
+++ Riskeer/DuneErosion/test/Riskeer.DuneErosion.Data.Test/DuneLocationTest.cs (.../DuneLocationTest.cs) (revision 44a03ef40419e0b6836311eddbed21de8b99b95e)
@@ -84,6 +84,7 @@
});
// Assert
+ Assert.AreSame(hydraulicBoundaryLocation, duneLocation.HydraulicBoundaryLocation);
Assert.AreEqual(hydraulicBoundaryLocation.Id, duneLocation.Id);
Assert.AreEqual(name, duneLocation.Name);
Assert.AreSame(hydraulicBoundaryLocation.Location, duneLocation.Location);