Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronisationTester.cs =================================================================== diff -u -r58390b8d17ea2843db8980b7020cbfebfcbec6d4 -rb3aa765e58b47a992f468fe46f8eb547ff3faed0 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronisationTester.cs (.../LocationsViewDataSynchronisationTester.cs) (revision 58390b8d17ea2843db8980b7020cbfebfcbec6d4) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronisationTester.cs (.../LocationsViewDataSynchronisationTester.cs) (revision b3aa765e58b47a992f468fe46f8eb547ff3faed0) @@ -35,11 +35,25 @@ /// The type of the locations contained by the view. public abstract class LocationsViewDataSynchronisationTester where T : class { + private Form testForm; + + [SetUp] + public void Setup() + { + testForm = new Form(); + } + + [TearDown] + public void TearDown() + { + testForm.Dispose(); + } + [Test] public void GivenFullyConfiguredView_WhenSelectingLocationWithoutOutput_ThenIllustrationPointsControlDataSetToEmptyEnumeration() { // Given - LocationsView locationsView = ShowFullyConfiguredLocationsView(); + LocationsView locationsView = ShowFullyConfiguredLocationsView(testForm); IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl(locationsView); DataGridViewControl dataGridViewControl = GetDataGridViewControl(locationsView); @@ -54,7 +68,7 @@ public void GivenFullyConfiguredView_WhenSelectingLocationWithoutGeneralResult_ThenIllustrationPointsControlDataSetToEmptyEnumeration() { // Given - LocationsView locationsView = ShowFullyConfiguredLocationsView(); + LocationsView locationsView = ShowFullyConfiguredLocationsView(testForm); IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl(locationsView); DataGridViewControl dataGridViewControl = GetDataGridViewControl(locationsView); @@ -69,7 +83,7 @@ public void GivenFullyConfiguredView_WhenSelectingLocationWithGeneralResult_ThenGeneralResultSetOnIllustrationPointsControlData() { // Given - LocationsView locationsView = ShowFullyConfiguredLocationsView(); + LocationsView locationsView = ShowFullyConfiguredLocationsView(testForm); IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl(locationsView); DataGridViewControl dataGridViewControl = GetDataGridViewControl(locationsView); @@ -83,6 +97,7 @@ /// /// Method for showing a fully configured locations view. /// + /// The form to use for showing the view. /// /// The view should contain the following location row data: /// @@ -92,7 +107,7 @@ /// /// /// The fully configured view. - protected abstract LocationsView ShowFullyConfiguredLocationsView(); + protected abstract LocationsView ShowFullyConfiguredLocationsView(Form form); private static DataGridViewControl GetDataGridViewControl(LocationsView locationsView) { Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r58390b8d17ea2843db8980b7020cbfebfcbec6d4 -rb3aa765e58b47a992f468fe46f8eb547ff3faed0 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 58390b8d17ea2843db8980b7020cbfebfcbec6d4) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision b3aa765e58b47a992f468fe46f8eb547ff3faed0) @@ -606,30 +606,10 @@ [TestFixture] public class DataSynchronisationTester : LocationsViewDataSynchronisationTester { - private Form testForm; - private MockRepository mockRepository; - - [SetUp] - public void Setup() + protected override LocationsView ShowFullyConfiguredLocationsView(Form form) { - testForm = new Form(); - mockRepository = new MockRepository(); + return ShowFullyConfiguredDesignWaterLevelLocationsView(new ObservableTestAssessmentSectionStub(), form); } - - [TearDown] - public void TearDown() - { - testForm.Dispose(); - mockRepository.VerifyAll(); - } - - protected override LocationsView ShowFullyConfiguredLocationsView() - { - var assessmentSection = mockRepository.Stub(); - mockRepository.ReplayAll(); - - return ShowFullyConfiguredDesignWaterLevelLocationsView(assessmentSection, testForm); - } } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs =================================================================== diff -u -r4d242a93341f3c101c064338a2c569e70bc77164 -rb3aa765e58b47a992f468fe46f8eb547ff3faed0 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 4d242a93341f3c101c064338a2c569e70bc77164) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision b3aa765e58b47a992f468fe46f8eb547ff3faed0) @@ -498,30 +498,10 @@ [TestFixture] public class DataSynchronisationTester : LocationsViewDataSynchronisationTester { - private Form testForm; - private MockRepository mockRepository; - - [SetUp] - public void Setup() + protected override LocationsView ShowFullyConfiguredLocationsView(Form form) { - testForm = new Form(); - mockRepository = new MockRepository(); + return ShowFullyConfiguredWaveHeightLocationsView(new ObservableTestAssessmentSectionStub(), form); } - - [TearDown] - public void TearDown() - { - testForm.Dispose(); - mockRepository.VerifyAll(); - } - - protected override LocationsView ShowFullyConfiguredLocationsView() - { - var assessmentSection = mockRepository.Stub(); - mockRepository.ReplayAll(); - - return ShowFullyConfiguredWaveHeightLocationsView(assessmentSection, testForm); - } } private static IEnumerable CreateControlItems( Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -rd8dd1bfa4342fc11c2ac81ee6e9702089eef3b9e -rb3aa765e58b47a992f468fe46f8eb547ff3faed0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision d8dd1bfa4342fc11c2ac81ee6e9702089eef3b9e) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision b3aa765e58b47a992f468fe46f8eb547ff3faed0) @@ -379,24 +379,10 @@ [TestFixture] public class DataSynchronisationTester : LocationsViewDataSynchronisationTester { - private Form testForm; - - [SetUp] - public void Setup() + protected override LocationsView ShowFullyConfiguredLocationsView(Form form) { - testForm = new Form(); + return ShowFullyConfiguredDesignWaterLevelLocationsView(form); } - - [TearDown] - public void TearDown() - { - testForm.Dispose(); - } - - protected override LocationsView ShowFullyConfiguredLocationsView() - { - return ShowFullyConfiguredDesignWaterLevelLocationsView(testForm); - } } private static IEnumerable CreateControlItems( Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -ra57f27274d60445b7cc8a6f328b797e1a40a8630 -rb3aa765e58b47a992f468fe46f8eb547ff3faed0 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision a57f27274d60445b7cc8a6f328b797e1a40a8630) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision b3aa765e58b47a992f468fe46f8eb547ff3faed0) @@ -371,24 +371,10 @@ [TestFixture] public class DataSynchronisationTester : LocationsViewDataSynchronisationTester { - private Form testForm; - - [SetUp] - public void Setup() + protected override LocationsView ShowFullyConfiguredLocationsView(Form form) { - testForm = new Form(); + return ShowFullyConfiguredWaveHeightLocationsView(form); } - - [TearDown] - public void TearDown() - { - testForm.Dispose(); - } - - protected override LocationsView ShowFullyConfiguredLocationsView() - { - return ShowFullyConfiguredWaveHeightLocationsView(testForm); - } } private static IEnumerable CreateControlItems(