Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/BackgroundMapDataSelectionDialogTest.cs =================================================================== diff -u -rdadf9ac48b69ed4e26610fc6e7ccf8af0e2f5452 -rad5fba0bbb2b3a4a7d99bc29b218eec1f96c2def --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/BackgroundMapDataSelectionDialogTest.cs (.../BackgroundMapDataSelectionDialogTest.cs) (revision dadf9ac48b69ed4e26610fc6e7ccf8af0e2f5452) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/BackgroundMapDataSelectionDialogTest.cs (.../BackgroundMapDataSelectionDialogTest.cs) (revision ad5fba0bbb2b3a4a7d99bc29b218eec1f96c2def) @@ -144,6 +144,23 @@ } } + [Test] + public void Dispose_DisposedAlreadyCalled_DoesNotThrowException() + { + // Call + TestDelegate call = () => + { + using (var dialogParent = new Form()) + using (var dialog = new BackgroundMapDataSelectionDialog(dialogParent)) + { + dialog.Dispose(); + } + }; + + // Assert + Assert.DoesNotThrow(call); + } + private static Icon BitmapToIcon(Bitmap icon) { return Icon.FromHandle(icon.GetHicon()); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WmtsLocationControlTest.cs =================================================================== diff -u -r46f8b6e121fc12d964c219c7726187db68d30892 -rad5fba0bbb2b3a4a7d99bc29b218eec1f96c2def --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision 46f8b6e121fc12d964c219c7726187db68d30892) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision ad5fba0bbb2b3a4a7d99bc29b218eec1f96c2def) @@ -192,6 +192,22 @@ } } + [Test] + public void Dispose_DisposedAlreadyCalled_DoesNotThrowException() + { + // Call + TestDelegate call = () => + { + using (var control = new WmtsLocationControl()) + { + control.Dispose(); + } + }; + + // Assert + Assert.DoesNotThrow(call); + } + private static Form ShowFullyConfiguredWmtsLocationControl() { var form = new Form();