Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs =================================================================== diff -u -r4b51144b28eeaa6ae0c10b02b2ccabd6bad8ec2d -r2ade7d912e2a4c2dfe475564b02894d4807f3908 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision 4b51144b28eeaa6ae0c10b02b2ccabd6bad8ec2d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision 2ade7d912e2a4c2dfe475564b02894d4807f3908) @@ -80,12 +80,21 @@ viewCommands.RemoveAllViewsForItem(assessmentSection); } - private void MergeHydraulicBoundaryLocations(AssessmentSection targetAssessmentSection, AssessmentSection sourceAssessmentSection) + private static void MergeHydraulicBoundaryLocations(AssessmentSection targetAssessmentSection, AssessmentSection sourceAssessmentSection) { - for (var i = 0; i < targetAssessmentSection.HydraulicBoundaryDatabase.Locations.Count; i++) + MergeHydraulicBoundaryLocationCalculations(targetAssessmentSection.WaterLevelCalculationsForFactorizedSignalingNorm, + sourceAssessmentSection.WaterLevelCalculationsForFactorizedSignalingNorm); + MergeHydraulicBoundaryLocationCalculations(targetAssessmentSection.WaterLevelCalculationsForSignalingNorm, + sourceAssessmentSection.WaterLevelCalculationsForSignalingNorm); + } + + private static void MergeHydraulicBoundaryLocationCalculations(IEnumerable targetCalculations, + IEnumerable sourceCalculations) + { + for (var i = 0; i < targetCalculations.Count(); i++) { - HydraulicBoundaryLocationCalculation targetCalculation = targetAssessmentSection.WaterLevelCalculationsForFactorizedSignalingNorm.ElementAt(i); - HydraulicBoundaryLocationCalculation sourceCalculation = sourceAssessmentSection.WaterLevelCalculationsForFactorizedSignalingNorm.ElementAt(i); + HydraulicBoundaryLocationCalculation targetCalculation = targetCalculations.ElementAt(i); + HydraulicBoundaryLocationCalculation sourceCalculation = sourceCalculations.ElementAt(i); if (ShouldMerge(targetCalculation, sourceCalculation)) { @@ -95,7 +104,7 @@ } } - private bool ShouldMerge(HydraulicBoundaryLocationCalculation targetCalculation, HydraulicBoundaryLocationCalculation sourceCalculation) + private static bool ShouldMerge(HydraulicBoundaryLocationCalculation targetCalculation, HydraulicBoundaryLocationCalculation sourceCalculation) { bool targetCalculationHasOutput = targetCalculation.HasOutput; bool sourceCalculationHasOutput = sourceCalculation.HasOutput;