Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -ref3fadb8742f1c2e60d2278a9d9a4639e1a4f44d -r03aa4faa360fec8d81feb026df9f46fcc2d9ad3e --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision ef3fadb8742f1c2e60d2278a9d9a4639e1a4f44d) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 03aa4faa360fec8d81feb026df9f46fcc2d9ad3e) @@ -339,7 +339,7 @@ var locations = (ObservableList) view.Data; // Precondition - DataGridViewControl dataGridView = GetDataGridViewControl(); + DataGridView dataGridView = GetDataGridView(); DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(5, rows.Count); Assert.AreEqual("-", rows[0].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs =================================================================== diff -u -ref3fadb8742f1c2e60d2278a9d9a4639e1a4f44d -r03aa4faa360fec8d81feb026df9f46fcc2d9ad3e --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision ef3fadb8742f1c2e60d2278a9d9a4639e1a4f44d) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 03aa4faa360fec8d81feb026df9f46fcc2d9ad3e) @@ -339,7 +339,7 @@ var locations = (ObservableList) view.Data; // Precondition - DataGridViewControl dataGridView = GetDataGridViewControl(); + DataGridView dataGridView = GetDataGridView(); DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(5, rows.Count); Assert.AreEqual("-", rows[0].Cells[locationWaveHeightColumnIndex].FormattedValue); @@ -348,11 +348,16 @@ Assert.AreEqual("-", rows[3].Cells[locationWaveHeightColumnIndex].FormattedValue); Assert.AreEqual(1.01.ToString(CultureInfo.CurrentCulture), rows[4].Cells[locationWaveHeightColumnIndex].FormattedValue); - // Call locations.ForEach(loc => loc.WaveHeightCalculation.Output = null); + + var refreshed = false; + dataGridView.Invalidated += (sender, args) => refreshed = true; + + // Call locations.NotifyObservers(); // Assert + Assert.IsTrue(refreshed); Assert.AreEqual(5, rows.Count); Assert.AreEqual("-", rows[0].Cells[locationWaveHeightColumnIndex].FormattedValue); Assert.AreEqual("-", rows[1].Cells[locationWaveHeightColumnIndex].FormattedValue); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r44feb1dc2f272d96fe24ff955557d0fb1d615737 -r03aa4faa360fec8d81feb026df9f46fcc2d9ad3e --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 44feb1dc2f272d96fe24ff955557d0fb1d615737) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 03aa4faa360fec8d81feb026df9f46fcc2d9ad3e) @@ -292,7 +292,7 @@ IAssessmentSection assessmentSection = view.AssessmentSection; // Precondition - DataGridViewControl dataGridView = GetDataGridViewControl(); + DataGridView dataGridView = GetDataGridView(); DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(5, rows.Count); Assert.AreEqual("-", rows[0].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); @@ -301,11 +301,16 @@ Assert.AreEqual("-", rows[3].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); Assert.AreEqual(1.01.ToString(CultureInfo.CurrentCulture), rows[4].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); - // Call assessmentSection.HydraulicBoundaryDatabase.Locations.ForEach(loc => loc.DesignWaterLevelCalculation.Output = null); + + var refreshed = false; + dataGridView.Invalidated += (sender, args) => refreshed = true; + + // Call assessmentSection.NotifyObservers(); // Assert + Assert.IsTrue(refreshed); Assert.AreEqual(5, rows.Count); Assert.AreEqual("-", rows[0].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); Assert.AreEqual("-", rows[1].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -r44feb1dc2f272d96fe24ff955557d0fb1d615737 -r03aa4faa360fec8d81feb026df9f46fcc2d9ad3e --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 44feb1dc2f272d96fe24ff955557d0fb1d615737) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 03aa4faa360fec8d81feb026df9f46fcc2d9ad3e) @@ -292,7 +292,7 @@ IAssessmentSection assessmentSection = view.AssessmentSection; // Precondition - DataGridViewControl dataGridView = GetDataGridViewControl(); + DataGridView dataGridView = GetDataGridView(); DataGridViewRowCollection rows = dataGridView.Rows; Assert.AreEqual(5, rows.Count); Assert.AreEqual("-", rows[0].Cells[locationWaveHeightColumnIndex].FormattedValue); @@ -301,11 +301,16 @@ Assert.AreEqual("-", rows[3].Cells[locationWaveHeightColumnIndex].FormattedValue); Assert.AreEqual(1.01.ToString(CultureInfo.CurrentCulture), rows[4].Cells[locationWaveHeightColumnIndex].FormattedValue); - // Call assessmentSection.HydraulicBoundaryDatabase.Locations.ForEach(loc => loc.WaveHeightCalculation.Output = null); + + var refreshed = false; + dataGridView.Invalidated += (sender, args) => refreshed = true; + + // Call assessmentSection.NotifyObservers(); // Assert + Assert.IsTrue(refreshed); Assert.AreEqual(5, rows.Count); Assert.AreEqual("-", rows[0].Cells[locationWaveHeightColumnIndex].FormattedValue); Assert.AreEqual("-", rows[1].Cells[locationWaveHeightColumnIndex].FormattedValue);