Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/SelectionDialogBaseTest.cs =================================================================== diff -u -r76511556cd5348a48bb0401dae48e6ed2215fa61 -r2973c5f790a5131e427bd5f73e2a620044199639 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/SelectionDialogBaseTest.cs (.../SelectionDialogBaseTest.cs) (revision 76511556cd5348a48bb0401dae48e6ed2215fa61) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/SelectionDialogBaseTest.cs (.../SelectionDialogBaseTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) @@ -83,24 +83,24 @@ // Assert Assert.IsEmpty(dialog.SelectedItems); - var dataGridViewControl = (DataGridViewControl)new ControlTester("DataGridViewControl", dialog).TheObject; + var dataGridViewControl = (DataGridViewControl) new ControlTester("DataGridViewControl", dialog).TheObject; var dataGridView = dataGridViewControl.Controls.OfType().First(); Assert.AreEqual(2, dataGridView.ColumnCount); - var locationCalculateColumn = (DataGridViewCheckBoxColumn)dataGridView.Columns[selectItemColumnIndex]; + var locationCalculateColumn = (DataGridViewCheckBoxColumn) dataGridView.Columns[selectItemColumnIndex]; const string expectedLocationCalculateHeaderText = "Gebruik"; Assert.AreEqual(expectedLocationCalculateHeaderText, locationCalculateColumn.HeaderText); Assert.AreEqual("Selected", locationCalculateColumn.DataPropertyName); Assert.IsFalse(locationCalculateColumn.ReadOnly); - var nameColumn = (DataGridViewTextBoxColumn)dataGridView.Columns[nameColumnIndex]; + var nameColumn = (DataGridViewTextBoxColumn) dataGridView.Columns[nameColumnIndex]; Assert.AreEqual(string.Empty, nameColumn.HeaderText); Assert.AreEqual("Name", nameColumn.DataPropertyName); Assert.AreEqual(DataGridViewAutoSizeColumnMode.Fill, nameColumn.AutoSizeMode); Assert.IsTrue(nameColumn.ReadOnly); var buttonTester = new ButtonTester("DoForSelectedButton", dialog); - var button = (Button)buttonTester.TheObject; + var button = (Button) buttonTester.TheObject; Assert.IsFalse(button.Enabled); } } @@ -132,7 +132,7 @@ using (var dialog = new TestFullyConfiguredSelectionDialogBase(testForm)) { - var selectionView = (DataGridViewControl)new ControlTester("DataGridViewControl", dialog).TheObject; + var selectionView = (DataGridViewControl) new ControlTester("DataGridViewControl", dialog).TheObject; dialog.SetDataSource(items); dialog.Show(); @@ -159,7 +159,7 @@ using (var dialog = new TestFullyConfiguredSelectionDialogBase(testForm)) { - var selectionView = (DataGridViewControl)new ControlTester("DataGridViewControl", dialog).TheObject; + var selectionView = (DataGridViewControl) new ControlTester("DataGridViewControl", dialog).TheObject; dialog.SetDataSource(items); dialog.Show(); @@ -187,7 +187,7 @@ using (var dialog = new TestFullyConfiguredSelectionDialogBase(testForm)) { - var selectionView = (DataGridViewControl)new ControlTester("DataGridViewControl", dialog).TheObject; + var selectionView = (DataGridViewControl) new ControlTester("DataGridViewControl", dialog).TheObject; dialog.SetDataSource(items); dialog.Show(); @@ -222,20 +222,20 @@ dialog.SetDataSource(items); dialog.Show(); - var dataGridView = (DataGridViewControl)new ControlTester("DataGridViewControl", dialog).TheObject; + var dataGridView = (DataGridViewControl) new ControlTester("DataGridViewControl", dialog).TheObject; var rows = dataGridView.Rows; var button = new ButtonTester("SelectAllButton", dialog); // Precondition - Assert.IsFalse((bool)rows[0].Cells[selectItemColumnIndex].Value); - Assert.IsFalse((bool)rows[1].Cells[selectItemColumnIndex].Value); + Assert.IsFalse((bool) rows[0].Cells[selectItemColumnIndex].Value); + Assert.IsFalse((bool) rows[1].Cells[selectItemColumnIndex].Value); // Call button.Click(); // Assert - Assert.IsTrue((bool)rows[0].Cells[selectItemColumnIndex].Value); - Assert.IsTrue((bool)rows[1].Cells[selectItemColumnIndex].Value); + Assert.IsTrue((bool) rows[0].Cells[selectItemColumnIndex].Value); + Assert.IsTrue((bool) rows[1].Cells[selectItemColumnIndex].Value); } } @@ -254,7 +254,7 @@ dialog.SetDataSource(items); dialog.Show(); - var dataGridView = (DataGridViewControl)new ControlTester("DataGridViewControl", dialog).TheObject; + var dataGridView = (DataGridViewControl) new ControlTester("DataGridViewControl", dialog).TheObject; var rows = dataGridView.Rows; var button = new ButtonTester("DeselectAllButton", dialog); @@ -264,15 +264,15 @@ } // Precondition - Assert.IsTrue((bool)rows[0].Cells[selectItemColumnIndex].Value); - Assert.IsTrue((bool)rows[1].Cells[selectItemColumnIndex].Value); + Assert.IsTrue((bool) rows[0].Cells[selectItemColumnIndex].Value); + Assert.IsTrue((bool) rows[1].Cells[selectItemColumnIndex].Value); // Call button.Click(); // Assert - Assert.IsFalse((bool)rows[0].Cells[selectItemColumnIndex].Value); - Assert.IsFalse((bool)rows[1].Cells[selectItemColumnIndex].Value); + Assert.IsFalse((bool) rows[0].Cells[selectItemColumnIndex].Value); + Assert.IsFalse((bool) rows[1].Cells[selectItemColumnIndex].Value); } } @@ -293,14 +293,14 @@ var buttonTester = new ButtonTester("DoForSelectedButton", dialog); // Call - var button = (Button)buttonTester.TheObject; + var button = (Button) buttonTester.TheObject; // Assert Assert.IsFalse(button.Enabled); Assert.IsEmpty(dialog.SelectedItems); } } - + private class TestSelectionDialogBase : SelectionDialogBase { public TestSelectionDialogBase(IWin32Window dialogParent) : base(dialogParent) {}