Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs =================================================================== diff -u -rfea3ed82dfb6dfcad535eef16efcbaa9c01564ed -rce871f8d394d4539208c9ef68372dd9d64ae1941 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs (.../GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs) (revision fea3ed82dfb6dfcad535eef16efcbaa9c01564ed) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs (.../GrassCoverErosionInwardsDikeProfileSelectionDialogTest.cs) (revision ce871f8d394d4539208c9ef68372dd9d64ae1941) @@ -93,19 +93,17 @@ CreateDikeProfile() }; - using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles)) - { - var selectionView = (DataGridView) new ControlTester("DikeProfileDataGrid", dialog).TheObject; + var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles); + var selectionView = (DataGridView) new ControlTester("DikeProfileDataGrid", dialog).TheObject; - dialog.Show(); - selectionView.Rows[0].Cells[0].Value = true; + dialog.Show(); + selectionView.Rows[0].Cells[0].Value = true; - // When - dialog.Close(); + // When + dialog.Close(); - // Then - Assert.IsEmpty(dialog.SelectedDikeProfiles); - } + // Then + Assert.IsEmpty(dialog.SelectedDikeProfiles); } [Test] @@ -119,20 +117,18 @@ CreateDikeProfile() }; - using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles)) - { - var selectionView = (DataGridView) new ControlTester("DikeProfileDataGrid", dialog).TheObject; + var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles); + var selectionView = (DataGridView) new ControlTester("DikeProfileDataGrid", dialog).TheObject; - dialog.Show(); - selectionView.Rows[0].Cells[0].Value = true; + dialog.Show(); + selectionView.Rows[0].Cells[0].Value = true; - // When - var cancelButton = new ButtonTester("CustomCancelButton", dialog); - cancelButton.Click(); + // When + var cancelButton = new ButtonTester("CustomCancelButton", dialog); + cancelButton.Click(); - // Then - Assert.IsEmpty(dialog.SelectedDikeProfiles); - } + // Then + Assert.IsEmpty(dialog.SelectedDikeProfiles); } [Test] @@ -146,24 +142,22 @@ CreateDikeProfile() }; - using (var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles)) - { - var selectionView = (DataGridView) new ControlTester("DikeProfileDataGrid", dialog).TheObject; + var dialog = new GrassCoverErosionInwardsDikeProfileSelectionDialog(new Form(), dikeProfiles); + var selectionView = (DataGridView) new ControlTester("DikeProfileDataGrid", dialog).TheObject; - dialog.Show(); - selectionView.Rows[0].Cells[0].Value = true; + dialog.Show(); + selectionView.Rows[0].Cells[0].Value = true; - // When - var okButton = new ButtonTester("OkButton", dialog); - okButton.Click(); + // When + var okButton = new ButtonTester("OkButton", dialog); + okButton.Click(); - // Then - var result = dialog.SelectedDikeProfiles; - CollectionAssert.AreEqual(new[] - { - selectedDikeProfile - }, result); - } + // Then + var result = dialog.SelectedDikeProfiles; + CollectionAssert.AreEqual(new[] + { + selectedDikeProfile + }, result); } private DikeProfile CreateDikeProfile()