Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/LocationsViewTest.cs =================================================================== diff -u -r504d0a039e01de3219f5ea21470c2f5e446e702a -r8e6506f609db1f94bfce07a20629b5781184be73 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/LocationsViewTest.cs (.../LocationsViewTest.cs) (revision 504d0a039e01de3219f5ea21470c2f5e446e702a) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/LocationsViewTest.cs (.../LocationsViewTest.cs) (revision 8e6506f609db1f94bfce07a20629b5781184be73) @@ -29,7 +29,6 @@ using NUnit.Framework; using Ringtoets.Common.Data.IllustrationPoints; using Ringtoets.Common.Data.TestUtil.IllustrationPoints; -using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Common.Forms.Views; @@ -141,73 +140,6 @@ } [Test] - public void GivenFullyConfiguredView_WhenSelectingCellInRow_ThenIllustrationPointsUpdated() - { - // Given - ShowFullyConfiguredTestCalculatableView(); - - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "DataGridView"); - DataGridView illustrationPointDataGridView = GetIllustrationPointDataGridView(); - - // Precondition - Assert.AreEqual(2, illustrationPointDataGridView.Rows.Count); - - // When - dataGridView.CurrentCell = dataGridView.Rows[1].Cells[calculateColumnIndex]; - EventHelper.RaiseEvent(dataGridView, "CellClick", new DataGridViewCellEventArgs(0, 0)); - - // Then - Assert.AreEqual(3, illustrationPointDataGridView.Rows.Count); - } - - [Test] - public void GivenFullyConfiguredView_WhenSelectingRowInLocationsTable_ThenReturnSelectedLocation() - { - // Given - TestLocationsView view = ShowFullyConfiguredTestCalculatableView(); - - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "DataGridView"); - DataGridViewRow currentRow = dataGridView.Rows[1]; - - TestCalculatableObject calculatableObject = ((TestCalculatableRow) currentRow.DataBoundItem).CalculatableObject; - - // When - dataGridView.CurrentCell = currentRow.Cells[calculateColumnIndex]; - EventHelper.RaiseEvent(dataGridView, "CellClick", new DataGridViewCellEventArgs(0, 0)); - object selection = view.Selection; - - // Then - Assert.AreSame(calculatableObject, selection); - } - - [Test] - public void GivenFullyConfiguredView_WhenSelectingRowInIllustrationPointsTable_ThenReturnSelectedIllustrationPoint() - { - // Given - TestLocationsView view = ShowFullyConfiguredTestCalculatableView(); - - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "DataGridView"); - DataGridView illustrationPointDataGridView = GetIllustrationPointDataGridView(); - - DataGridViewRow currentRow = illustrationPointDataGridView.Rows[1]; - - TestCalculatableObject calculatableObject = ((TestCalculatableRow) dataGridView.Rows[0].DataBoundItem).CalculatableObject; - - // When - illustrationPointDataGridView.CurrentCell = currentRow.Cells[calculateColumnIndex]; - EventHelper.RaiseEvent(illustrationPointDataGridView, "CellClick", new DataGridViewCellEventArgs(0, 0)); - object selection = view.Selection; - - // Then - var selectedTopLevelSubMechanismIllustrationPoint = selection as SelectedTopLevelSubMechanismIllustrationPoint; - Assert.IsNotNull(selectedTopLevelSubMechanismIllustrationPoint); - Assert.AreSame(calculatableObject.GeneralResult.TopLevelIllustrationPoints.ElementAt(1), - selectedTopLevelSubMechanismIllustrationPoint.TopLevelSubMechanismIllustrationPoint); - CollectionAssert.AreEqual(calculatableObject.GeneralResult.TopLevelIllustrationPoints.Select(ip => ip.ClosingSituation), - selectedTopLevelSubMechanismIllustrationPoint.ClosingSituations); - } - - [Test] public void SelectAllButton_SelectAllButtonClicked_AllCalculatableItemsSelected() { // Setup @@ -308,12 +240,6 @@ Assert.AreEqual(expectedObject, view.ObjectsToCalculate.First()); } - private DataGridView GetIllustrationPointDataGridView() - { - DataGridViewControl dataGridViewControl = ControlTestHelper.GetDataGridViewControl(testForm, "illustrationPointsDataGridViewControl"); - return ControlTestHelper.GetDataGridView(dataGridViewControl, "DataGridView"); - } - private TestLocationsView ShowTestCalculatableView() { var view = new TestLocationsView(); @@ -436,19 +362,13 @@ { TestCalculatableObject calculatableObject = ((TestCalculatableRow) dataGridViewControl.CurrentRow?.DataBoundItem)?.CalculatableObject; - if (calculatableObject?.GeneralResult != null) - { - return calculatableObject.GeneralResult - .TopLevelIllustrationPoints - .Select(topLevelSubMechanismIllustrationPoint => - new IllustrationPointControlItem(topLevelSubMechanismIllustrationPoint, - topLevelSubMechanismIllustrationPoint.WindDirection.Name, - topLevelSubMechanismIllustrationPoint.ClosingSituation, - topLevelSubMechanismIllustrationPoint.SubMechanismIllustrationPoint.Stochasts, - topLevelSubMechanismIllustrationPoint.SubMechanismIllustrationPoint.Beta)); - } - - return null; + return calculatableObject?.GeneralResult?.TopLevelIllustrationPoints + .Select(topLevelSubMechanismIllustrationPoint => + new IllustrationPointControlItem(topLevelSubMechanismIllustrationPoint, + topLevelSubMechanismIllustrationPoint.WindDirection.Name, + topLevelSubMechanismIllustrationPoint.ClosingSituation, + topLevelSubMechanismIllustrationPoint.SubMechanismIllustrationPoint.Stochasts, + topLevelSubMechanismIllustrationPoint.SubMechanismIllustrationPoint.Beta)); } } } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronizationTester.cs =================================================================== diff -u -r504d0a039e01de3219f5ea21470c2f5e446e702a -r8e6506f609db1f94bfce07a20629b5781184be73 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronizationTester.cs (.../LocationsViewDataSynchronizationTester.cs) (revision 504d0a039e01de3219f5ea21470c2f5e446e702a) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronizationTester.cs (.../LocationsViewDataSynchronizationTester.cs) (revision 8e6506f609db1f94bfce07a20629b5781184be73) @@ -308,7 +308,7 @@ } [Test] - public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenOutputCleared_ThenSelectionSetToLocation() + public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenDatabaseReplaced_ThenSelectionSetToLocation() { // Given LocationsView view = ShowFullyConfiguredLocationsView(testForm); @@ -326,15 +326,15 @@ Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint); // When - ClearLocationOutputAndNotifyObservers(view); + ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(view); // Then - Assert.AreEqual(4, locationsDataGridView.CurrentRow?.Index); + Assert.AreEqual(0, locationsDataGridView.CurrentRow?.Index); Assert.AreEqual(GetLocationSelection(view, locationsDataGridView.CurrentRow?.DataBoundItem), view.Selection); } [Test] - public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenOutputUpdated_ThenSelectionPreserved() + public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenOutputCleared_ThenSelectionSetToLocation() { // Given LocationsView view = ShowFullyConfiguredLocationsView(testForm); @@ -352,18 +352,15 @@ Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint); // When - AddLocationOutputAndNotifyObservers(view); + ClearLocationOutputAndNotifyObservers(view); // Then Assert.AreEqual(4, locationsDataGridView.CurrentRow?.Index); - Assert.AreEqual(1, illustrationPointsDataGridView.CurrentRow?.Index); - selection = view.Selection as SelectedTopLevelSubMechanismIllustrationPoint; - Assert.IsNotNull(selection); - Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint); + Assert.AreEqual(GetLocationSelection(view, locationsDataGridView.CurrentRow?.DataBoundItem), view.Selection); } [Test] - public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenDatabaseReplaced_ThenSelectionSetToLocation() + public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenOutputUpdated_ThenSelectionPreserved() { // Given LocationsView view = ShowFullyConfiguredLocationsView(testForm); @@ -381,11 +378,14 @@ Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint); // When - ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(view); + AddLocationOutputAndNotifyObservers(view); // Then - Assert.AreEqual(0, locationsDataGridView.CurrentRow?.Index); - Assert.AreEqual(GetLocationSelection(view, locationsDataGridView.CurrentRow?.DataBoundItem), view.Selection); + Assert.AreEqual(4, locationsDataGridView.CurrentRow?.Index); + Assert.AreEqual(1, illustrationPointsDataGridView.CurrentRow?.Index); + selection = view.Selection as SelectedTopLevelSubMechanismIllustrationPoint; + Assert.IsNotNull(selection); + Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint); } #endregion Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r504d0a039e01de3219f5ea21470c2f5e446e702a -r8e6506f609db1f94bfce07a20629b5781184be73 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 504d0a039e01de3219f5ea21470c2f5e446e702a) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 8e6506f609db1f94bfce07a20629b5781184be73) @@ -420,7 +420,7 @@ } [TestFixture] - public class DataSynchronizationTester : LocationsViewDataSynchronizationTester + public class SynchronizationTester : LocationsViewDataSynchronizationTester { protected override int OutputColumnIndex { Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs =================================================================== diff -u -r504d0a039e01de3219f5ea21470c2f5e446e702a -r8e6506f609db1f94bfce07a20629b5781184be73 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 504d0a039e01de3219f5ea21470c2f5e446e702a) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 8e6506f609db1f94bfce07a20629b5781184be73) @@ -419,7 +419,7 @@ } [TestFixture] - public class DataSynchronizationTester : LocationsViewDataSynchronizationTester + public class SynchronizationTester : LocationsViewDataSynchronizationTester { protected override int OutputColumnIndex { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r3fa158d7e6052014732df99d2a8e0fcad6bd1d18 -r8e6506f609db1f94bfce07a20629b5781184be73 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 8e6506f609db1f94bfce07a20629b5781184be73) @@ -86,7 +86,7 @@ ShowDesignWaterLevelLocationsView(new ObservableTestAssessmentSectionStub(), testForm); // Assert - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "DataGridView"); + DataGridView dataGridView = GetDataGridView(); Assert.AreEqual(6, dataGridView.ColumnCount); var locationCalculateColumn = (DataGridViewCheckBoxColumn) dataGridView.Columns[locationCalculateColumnIndex]; @@ -112,46 +112,14 @@ } [Test] - public void GivenFullyConfiguredView_WhenSelectingRowInLocationsTable_ThenReturnSelectedLocation() - { - // Given - DesignWaterLevelLocationsView view = ShowFullyConfiguredDesignWaterLevelLocationsView(testForm); - - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "DataGridView"); - DataGridViewRow currentRow = dataGridView.Rows[1]; - - HydraulicBoundaryLocation location = ((HydraulicBoundaryLocationRow) currentRow.DataBoundItem).CalculatableObject; - - // When - dataGridView.CurrentCell = currentRow.Cells[0]; - EventHelper.RaiseEvent(dataGridView, "CellClick", new DataGridViewCellEventArgs(0, 0)); - var selection = view.Selection as DesignWaterLevelLocationContext; - - // Then - Assert.IsNotNull(selection); - Assert.AreSame(location, selection.HydraulicBoundaryLocation); - } - - [Test] - public void Selection_WithoutLocations_ReturnsNull() - { - // Call - using (var view = new DesignWaterLevelLocationsView(new ObservableTestAssessmentSectionStub())) - { - // Assert - Assert.IsNull(view.Selection); - } - } - - [Test] public void DesignWaterLevelLocationsView_AssessmentSectionWithData_DataGridViewCorrectlyInitialized() { // Setup & Call ShowFullyConfiguredDesignWaterLevelLocationsView(testForm); // Assert - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; Assert.AreEqual(5, rows.Count); DataGridViewCellCollection cells = rows[0].Cells; @@ -221,8 +189,8 @@ newHydraulicBoundaryDatabase.Locations.Add(hydraulicBoundaryLocation); // Precondition - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; Assert.AreEqual(5, rows.Count); assessmentSection.HydraulicBoundaryDatabase = newHydraulicBoundaryDatabase; @@ -247,10 +215,10 @@ { // Setup DesignWaterLevelLocationsView view = ShowFullyConfiguredDesignWaterLevelLocationsView(testForm); - IllustrationPointsControl illustrationPointsControl = ControlTestHelper.GetControls(testForm, "IllustrationPointsControl").First(); - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); + IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl(); + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); - dataGridView.SetCurrentCell(dataGridView.GetCell(3, 0)); + dataGridViewControl.SetCurrentCell(dataGridViewControl.GetCell(3, 0)); // Precondition CollectionAssert.IsEmpty(illustrationPointsControl.Data); @@ -281,8 +249,8 @@ // Setup DesignWaterLevelLocationsView view = ShowFullyConfiguredDesignWaterLevelLocationsView(testForm); IAssessmentSection assessmentSection = view.AssessmentSection; - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; rows[0].Cells[locationCalculateColumnIndex].Value = true; var mockRepository = new MockRepository(); @@ -328,8 +296,8 @@ // Setup ShowFullyConfiguredDesignWaterLevelLocationsView(testForm); - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; rows[0].Cells[locationCalculateColumnIndex].Value = true; var button = new ButtonTester("CalculateForSelectedButton", testForm); @@ -341,8 +309,23 @@ Assert.DoesNotThrow(test); } + private DataGridViewControl GetDataGridViewControl() + { + return ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); + } + + private DataGridView GetDataGridView() + { + return ControlTestHelper.GetDataGridView(testForm, "DataGridView"); + } + + private IllustrationPointsControl GetIllustrationPointsControl() + { + return ControlTestHelper.GetControls(testForm, "IllustrationPointsControl").First(); + } + [TestFixture] - public class DataSynchronizationTester : LocationsViewDataSynchronizationTester + public class SynchronizationTester : LocationsViewDataSynchronizationTester { protected override int OutputColumnIndex { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -r3fa158d7e6052014732df99d2a8e0fcad6bd1d18 -r8e6506f609db1f94bfce07a20629b5781184be73 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 8e6506f609db1f94bfce07a20629b5781184be73) @@ -84,7 +84,7 @@ ShowWaveHeightLocationsView(new ObservableTestAssessmentSectionStub(), testForm); // Assert - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "DataGridView"); + DataGridView dataGridView = GetDataGridView(); Assert.AreEqual(6, dataGridView.ColumnCount); var locationCalculateColumn = (DataGridViewCheckBoxColumn) dataGridView.Columns[locationCalculateColumnIndex]; @@ -110,46 +110,14 @@ } [Test] - public void GivenFullyConfiguredView_WhenSelectingRowInLocationsTable_ThenReturnSelectedLocation() - { - // Given - WaveHeightLocationsView view = ShowFullyConfiguredWaveHeightLocationsView(testForm); - - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "DataGridView"); - DataGridViewRow currentRow = dataGridView.Rows[1]; - - HydraulicBoundaryLocation location = ((HydraulicBoundaryLocationRow) currentRow.DataBoundItem).CalculatableObject; - - // When - dataGridView.CurrentCell = currentRow.Cells[0]; - EventHelper.RaiseEvent(dataGridView, "CellClick", new DataGridViewCellEventArgs(0, 0)); - var selection = view.Selection as WaveHeightLocationContext; - - // Then - Assert.IsNotNull(selection); - Assert.AreSame(location, selection.HydraulicBoundaryLocation); - } - - [Test] - public void Selection_WithoutLocations_ReturnsNull() - { - // Call - using (var view = new WaveHeightLocationsView(new ObservableTestAssessmentSectionStub())) - { - // Assert - Assert.IsNull(view.Selection); - } - } - - [Test] public void WaveHeightLocationsView_AssessmentSectionWithData_DataGridViewCorrectlyInitialized() { // Setup & Call ShowFullyConfiguredWaveHeightLocationsView(testForm); // Assert - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; Assert.AreEqual(5, rows.Count); DataGridViewCellCollection cells = rows[0].Cells; @@ -219,8 +187,8 @@ newHydraulicBoundaryDatabase.Locations.Add(hydraulicBoundaryLocation); // Precondition - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; Assert.AreEqual(5, rows.Count); // Call @@ -244,12 +212,11 @@ { // Setup WaveHeightLocationsView view = ShowFullyConfiguredWaveHeightLocationsView(testForm); - IllustrationPointsControl illustrationPointsControl = ControlTestHelper.GetControls(testForm, - "IllustrationPointsControl").First(); + IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl(); - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); - dataGridView.SetCurrentCell(dataGridView.GetCell(3, 0)); + dataGridViewControl.SetCurrentCell(dataGridViewControl.GetCell(3, 0)); // Precondition CollectionAssert.IsEmpty(illustrationPointsControl.Data); @@ -280,8 +247,8 @@ // Setup WaveHeightLocationsView view = ShowFullyConfiguredWaveHeightLocationsView(testForm); IAssessmentSection assessmentSection = view.AssessmentSection; - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; rows[0].Cells[locationCalculateColumnIndex].Value = true; var mockRepository = new MockRepository(); @@ -320,8 +287,8 @@ // Setup ShowFullyConfiguredWaveHeightLocationsView(testForm); - DataGridViewControl dataGridView = ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); - DataGridViewRowCollection rows = dataGridView.Rows; + DataGridViewControl dataGridViewControl = GetDataGridViewControl(); + DataGridViewRowCollection rows = dataGridViewControl.Rows; rows[0].Cells[locationCalculateColumnIndex].Value = true; var button = new ButtonTester("CalculateForSelectedButton", testForm); @@ -333,8 +300,23 @@ Assert.DoesNotThrow(test); } + private DataGridViewControl GetDataGridViewControl() + { + return ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl"); + } + + private DataGridView GetDataGridView() + { + return ControlTestHelper.GetDataGridView(testForm, "DataGridView"); + } + + private IllustrationPointsControl GetIllustrationPointsControl() + { + return ControlTestHelper.GetControls(testForm, "IllustrationPointsControl").First(); + } + [TestFixture] - public class DataSynchronizationTester : LocationsViewDataSynchronizationTester + public class SynchronizationTester : LocationsViewDataSynchronizationTester { protected override int OutputColumnIndex {