Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs =================================================================== diff -u -r179b85228f5a860ff30681827920f25be1116c56 -r20a3e0fe462e2afb58034a32ac56c063c7d9b5e2 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision 179b85228f5a860ff30681827920f25be1116c56) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision 20a3e0fe462e2afb58034a32ac56c063c7d9b5e2) @@ -36,30 +36,39 @@ { /// /// Sets based upon - /// the locations from the . + /// the . /// /// The to update. - /// The database to use. - /// The dune locations to use. - /// Thrown when is null. + /// The hydraulic boundary location to use. + /// The dune locations to use. + /// Thrown when any parameter is null. public static void SetDuneLocations(DuneErosionFailureMechanism failureMechanism, - HydraulicBoundaryDatabase hydraulicBoundaryDatabase, - IEnumerable duneLocations) + IEnumerable hydraulicBoundaryLocations, + IEnumerable readDuneLocations) { if (failureMechanism == null) { throw new ArgumentNullException("failureMechanism"); } + if (hydraulicBoundaryLocations == null) + { + throw new ArgumentNullException("hydraulicBoundaryLocations"); + } + if (readDuneLocations == null) + { + throw new ArgumentNullException("readDuneLocations"); + } + failureMechanism.DuneLocations.Clear(); - if (hydraulicBoundaryDatabase == null || duneLocations == null || !duneLocations.Any()) + if (!hydraulicBoundaryLocations.Any() || !readDuneLocations.Any()) { return; } - foreach (ReadDuneLocation duneLocation in duneLocations) + foreach (ReadDuneLocation duneLocation in readDuneLocations) { - foreach (var hydraulicBoundaryLocation in hydraulicBoundaryDatabase.Locations) + foreach (var hydraulicBoundaryLocation in hydraulicBoundaryLocations) { if (Math2D.AreEqualPoints(hydraulicBoundaryLocation.Location, duneLocation.Location)) {