Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsReader.cs =================================================================== diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -r5b1b0a2b698e20d3972e2a8f511b4f49dc1cfcd0 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsReader.cs (.../DuneLocationsReader.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsReader.cs (.../DuneLocationsReader.cs) (revision 5b1b0a2b698e20d3972e2a8f511b4f49dc1cfcd0) @@ -59,11 +59,14 @@ { string filePath = Path.Combine(embeddedResourceFileWriter.TargetFolderPath, "RSPstelsel.shp"); + var readDuneLocations = new List(); using (var pointShapeReader = new PointShapeFileReader(filePath)) { FeatureBasedMapData locationsData = pointShapeReader.ReadShapeFile(); - return CreateDuneLocations(locationsData); + readDuneLocations.AddRange(CreateDuneLocations(locationsData)); } + + return readDuneLocations; } } Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Plugin/Handlers/DuneLocationsReplacementHandler.cs =================================================================== diff -u -re57e79927485e44d681b0617f17bada42dbfb862 -r5b1b0a2b698e20d3972e2a8f511b4f49dc1cfcd0 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Plugin/Handlers/DuneLocationsReplacementHandler.cs (.../DuneLocationsReplacementHandler.cs) (revision e57e79927485e44d681b0617f17bada42dbfb862) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Plugin/Handlers/DuneLocationsReplacementHandler.cs (.../DuneLocationsReplacementHandler.cs) (revision 5b1b0a2b698e20d3972e2a8f511b4f49dc1cfcd0) @@ -37,6 +37,7 @@ { private readonly IViewCommands viewCommands; private readonly DuneErosionFailureMechanism failureMechanism; + private readonly DuneLocationsReader duneLocationsReader; /// /// Creates a new instance of . @@ -58,6 +59,8 @@ this.viewCommands = viewCommands; this.failureMechanism = failureMechanism; + + duneLocationsReader = new DuneLocationsReader(); } /// @@ -69,8 +72,7 @@ /// is null. public void Replace(HydraulicBoundaryLocation[] newHydraulicBoundaryLocations) { - var duneLocationsReader = new DuneLocationsReader(); - IEnumerable newDuneLocations = duneLocationsReader.ReadDuneLocations().ToArray(); + IEnumerable newDuneLocations = duneLocationsReader.ReadDuneLocations(); DuneErosionDataSynchronizationService.SetDuneLocations(failureMechanism, newHydraulicBoundaryLocations,