Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs =================================================================== diff -u -rac2ef64a966ba1988c30df9773b383716e133eef -r0a3fd57580aff0d6487e195c67f315f628b1ced4 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision ac2ef64a966ba1988c30df9773b383716e133eef) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision 0a3fd57580aff0d6487e195c67f315f628b1ced4) @@ -54,6 +54,27 @@ public void PerformMerge(AssessmentSection targetAssessmentSection, AssessmentSection sourceAssessmentSection, IEnumerable failureMechanismsToMerge) { + if (targetAssessmentSection == null) + { + throw new ArgumentNullException(nameof(targetAssessmentSection)); + } + + if (sourceAssessmentSection == null) + { + throw new ArgumentNullException(nameof(sourceAssessmentSection)); + } + + if (failureMechanismsToMerge == null) + { + throw new ArgumentNullException(nameof(failureMechanismsToMerge)); + } + + BeforeMerge(targetAssessmentSection); } + + private void BeforeMerge(AssessmentSection assessmentSection) + { + viewCommands.RemoveAllViewsForItem(assessmentSection); + } } } \ No newline at end of file