Fisheye: Tag 3fa158d7e6052014732df99d2a8e0fcad6bd1d18 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronisationTester.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronizationTester.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronizationTester.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/LocationsViewDataSynchronizationTester.cs (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18)
@@ -0,0 +1,357 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Linq;
+using System.Windows.Forms;
+using Core.Common.Controls.DataGrid;
+using NUnit.Framework;
+using Ringtoets.Common.Forms.PresentationObjects;
+using Ringtoets.Common.Forms.Views;
+
+namespace Ringtoets.Common.Forms.TestUtil
+{
+ ///
+ /// Class for testing data synchronization in derivatives.
+ ///
+ /// The type of the locations contained by the view.
+ public abstract class LocationsViewDataSynchronizationTester where T : class
+ {
+ private Form testForm;
+
+ [SetUp]
+ public void Setup()
+ {
+ testForm = new Form();
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ testForm.Dispose();
+ }
+
+ #region Data synchronization
+
+ [Test]
+ public void GivenFullyConfiguredView_WhenSelectingLocationWithoutOutput_ThenIllustrationPointsControlDataSetToEmptyEnumeration()
+ {
+ // Given
+ ShowFullyConfiguredLocationsView(testForm);
+ IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl();
+ DataGridViewControl locationsDataGridViewControl = GetLocationsDataGridViewControl();
+
+ // When
+ locationsDataGridViewControl.SetCurrentCell(locationsDataGridViewControl.GetCell(0, 1));
+
+ // Then
+ CollectionAssert.IsEmpty(illustrationPointsControl.Data);
+ }
+
+ [Test]
+ public void GivenFullyConfiguredView_WhenSelectingLocationWithoutGeneralResult_ThenIllustrationPointsControlDataSetToEmptyEnumeration()
+ {
+ // Given
+ ShowFullyConfiguredLocationsView(testForm);
+ IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl();
+ DataGridViewControl locationsDataGridViewControl = GetLocationsDataGridViewControl();
+
+ // When
+ locationsDataGridViewControl.SetCurrentCell(locationsDataGridViewControl.GetCell(1, 0));
+
+ // Then
+ CollectionAssert.IsEmpty(illustrationPointsControl.Data);
+ }
+
+ [Test]
+ public void GivenFullyConfiguredView_WhenSelectingLocationWithGeneralResult_ThenGeneralResultSetOnIllustrationPointsControlData()
+ {
+ // Given
+ ShowFullyConfiguredLocationsView(testForm);
+ IllustrationPointsControl illustrationPointsControl = GetIllustrationPointsControl();
+ DataGridViewControl locationsDataGridViewControl = GetLocationsDataGridViewControl();
+
+ // When
+ locationsDataGridViewControl.SetCurrentCell(locationsDataGridViewControl.GetCell(4, 0));
+
+ // Then
+ Assert.AreEqual(2, illustrationPointsControl.Data.Count());
+ }
+
+ [Test]
+ public void GivenFullyConfiguredViewWithFilledIllustrationPointsControl_WhenOutputCleared_ThenDataGridViewsUpdated()
+ {
+ // Given
+ LocationsView view = ShowFullyConfiguredLocationsView(testForm);
+ DataGridView locationsDataGridView = GetLocationsDataGridView();
+ DataGridViewRowCollection locationsDataGridViewRows = locationsDataGridView.Rows;
+ locationsDataGridView.CurrentCell = locationsDataGridViewRows[4].Cells[0];
+
+ // Precondition
+ Assert.AreEqual(5, locationsDataGridViewRows.Count);
+ Assert.AreEqual("-", locationsDataGridViewRows[0].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreNotEqual("-", locationsDataGridViewRows[1].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreEqual("-", locationsDataGridViewRows[2].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreEqual("-", locationsDataGridViewRows[3].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreNotEqual("-", locationsDataGridViewRows[4].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreEqual(2, GetIllustrationPointsControl().Data.Count());
+
+ var refreshed = false;
+ locationsDataGridView.Invalidated += (sender, args) => refreshed = true;
+
+ // When
+ ClearLocationOutputAndNotifyObservers(view);
+
+ // Then
+ Assert.IsTrue(refreshed);
+ Assert.AreEqual(5, locationsDataGridViewRows.Count);
+ Assert.AreEqual("-", locationsDataGridViewRows[0].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreEqual("-", locationsDataGridViewRows[1].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreEqual("-", locationsDataGridViewRows[2].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreEqual("-", locationsDataGridViewRows[3].Cells[OutputColumnIndex].FormattedValue);
+ Assert.AreEqual("-", locationsDataGridViewRows[4].Cells[OutputColumnIndex].FormattedValue);
+ CollectionAssert.IsEmpty(GetIllustrationPointsControl().Data);
+ }
+
+ #endregion
+
+ #region Selection synchronization
+
+ [Test]
+ public void GivenFullyConfiguredViewWithLocationSelection_WhenDatabaseReplaced_ThenSelectionUpdated()
+ {
+ // Given
+ LocationsView view = ShowFullyConfiguredLocationsView(testForm);
+
+ DataGridView locationsDataGridView = GetLocationsDataGridView();
+ locationsDataGridView.CurrentCell = locationsDataGridView.Rows[4].Cells[0];
+
+ // Precondition
+ DataGridViewRow currentLocationRow = GetLocationsDataGridViewControl().CurrentRow;
+ Assert.AreEqual(4, currentLocationRow.Index);
+ Assert.AreEqual(GetLocationSelection(view, currentLocationRow.DataBoundItem), view.Selection);
+
+ // When
+ ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(view);
+
+ // Then
+ currentLocationRow = GetLocationsDataGridViewControl().CurrentRow;
+ Assert.AreEqual(0, currentLocationRow.Index);
+ Assert.AreEqual(GetLocationSelection(view, currentLocationRow.DataBoundItem), view.Selection);
+ }
+
+ [Test]
+ public void GivenFullyConfiguredViewWithLocationSelection_WhenOutputCleared_ThenSelectionPreserved()
+ {
+ // Given
+ LocationsView view = ShowFullyConfiguredLocationsView(testForm);
+
+ DataGridView locationsDataGridView = GetLocationsDataGridView();
+ locationsDataGridView.CurrentCell = locationsDataGridView.Rows[4].Cells[0];
+
+ // Precondition
+ DataGridViewRow currentLocationRow = GetLocationsDataGridViewControl().CurrentRow;
+ Assert.AreEqual(4, currentLocationRow.Index);
+ Assert.AreEqual(GetLocationSelection(view, currentLocationRow.DataBoundItem), view.Selection);
+
+ // When
+ ClearLocationOutputAndNotifyObservers(view);
+
+ // Then
+ currentLocationRow = GetLocationsDataGridViewControl().CurrentRow;
+ Assert.AreEqual(4, currentLocationRow.Index);
+ Assert.AreEqual(GetLocationSelection(view, currentLocationRow.DataBoundItem), view.Selection);
+ }
+
+ [Test]
+ public void GivenFullyConfiguredViewWithLocationSelection_WhenOutputUpdated_ThenSelectionPreserved()
+ {
+ // Given
+ LocationsView view = ShowFullyConfiguredLocationsView(testForm);
+
+ DataGridView locationsDataGridView = GetLocationsDataGridView();
+ locationsDataGridView.CurrentCell = locationsDataGridView.Rows[4].Cells[0];
+
+ // Precondition
+ DataGridViewRow currentLocationRow = GetLocationsDataGridViewControl().CurrentRow;
+ Assert.AreEqual(4, currentLocationRow.Index);
+ Assert.AreEqual(GetLocationSelection(view, currentLocationRow.DataBoundItem), view.Selection);
+
+ // When
+ AddLocationOutputAndNotifyObservers(view);
+
+ // Then
+ currentLocationRow = GetLocationsDataGridViewControl().CurrentRow;
+ Assert.AreEqual(4, currentLocationRow.Index);
+ Assert.AreEqual(GetLocationSelection(view, currentLocationRow.DataBoundItem), view.Selection);
+ }
+
+ [Test]
+ public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenOutputCleared_ThenSelectionSetToLocation()
+ {
+ // Given
+ LocationsView view = ShowFullyConfiguredLocationsView(testForm);
+
+ DataGridView locationsDataGridView = GetLocationsDataGridView();
+ locationsDataGridView.CurrentCell = locationsDataGridView.Rows[4].Cells[0];
+ DataGridView illustrationPointsDataGridView = GetIllustrationPointsDataGridView();
+ illustrationPointsDataGridView.CurrentCell = illustrationPointsDataGridView.Rows[1].Cells[0];
+
+ // Precondition
+ Assert.AreEqual(4, locationsDataGridView.CurrentRow?.Index);
+ Assert.AreEqual(1, illustrationPointsDataGridView.CurrentRow?.Index);
+ var selection = view.Selection as SelectedTopLevelSubMechanismIllustrationPoint;
+ Assert.IsNotNull(selection);
+ Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint);
+
+ // When
+ ClearLocationOutputAndNotifyObservers(view);
+
+ // Then
+ Assert.AreEqual(4, locationsDataGridView.CurrentRow?.Index);
+ Assert.AreEqual(GetLocationSelection(view, locationsDataGridView.CurrentRow?.DataBoundItem), view.Selection);
+ }
+
+ [Test]
+ public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenOutputUpdated_ThenSelectionPreserved()
+ {
+ // Given
+ LocationsView view = ShowFullyConfiguredLocationsView(testForm);
+
+ DataGridView locationsDataGridView = GetLocationsDataGridView();
+ locationsDataGridView.CurrentCell = locationsDataGridView.Rows[4].Cells[0];
+ DataGridView illustrationPointsDataGridView = GetIllustrationPointsDataGridView();
+ illustrationPointsDataGridView.CurrentCell = illustrationPointsDataGridView.Rows[1].Cells[0];
+
+ // Precondition
+ Assert.AreEqual(4, locationsDataGridView.CurrentRow?.Index);
+ Assert.AreEqual(1, illustrationPointsDataGridView.CurrentRow?.Index);
+ var selection = view.Selection as SelectedTopLevelSubMechanismIllustrationPoint;
+ Assert.IsNotNull(selection);
+ Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint);
+
+ // When
+ AddLocationOutputAndNotifyObservers(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);
+ }
+
+ [Test]
+ public void GivenFullyConfiguredViewWithIllustrationPointSelection_WhenDatabaseReplaced_ThenSelectionSetToLocation()
+ {
+ // Given
+ LocationsView view = ShowFullyConfiguredLocationsView(testForm);
+
+ DataGridView locationsDataGridView = GetLocationsDataGridView();
+ locationsDataGridView.CurrentCell = locationsDataGridView.Rows[4].Cells[0];
+ DataGridView illustrationPointsDataGridView = GetIllustrationPointsDataGridView();
+ illustrationPointsDataGridView.CurrentCell = illustrationPointsDataGridView.Rows[1].Cells[0];
+
+ // Precondition
+ Assert.AreEqual(4, locationsDataGridView.CurrentRow?.Index);
+ Assert.AreEqual(1, illustrationPointsDataGridView.CurrentRow?.Index);
+ var selection = view.Selection as SelectedTopLevelSubMechanismIllustrationPoint;
+ Assert.IsNotNull(selection);
+ Assert.AreSame(GetIllustrationPointsControl().Data.ElementAt(1).Source, selection.TopLevelSubMechanismIllustrationPoint);
+
+ // When
+ ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(view);
+
+ // Then
+ Assert.AreEqual(0, locationsDataGridView.CurrentRow?.Index);
+ Assert.AreEqual(GetLocationSelection(view, locationsDataGridView.CurrentRow?.DataBoundItem), view.Selection);
+ }
+
+ #endregion
+
+ ///
+ /// Gets the index of the column containing the locations output.
+ ///
+ protected abstract int OutputColumnIndex { get; }
+
+ ///
+ /// Method for obtaining the view selection object related to the selected location row.
+ ///
+ /// The locations view involved.
+ /// The selected location row object.
+ /// The view selection object.
+ protected abstract object GetLocationSelection(LocationsView view, object selectedRowObject);
+
+ ///
+ /// 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:
+ ///
+ /// - Row 1: location without output
+ /// - Row 2: location with design water level output (but without general result)
+ /// - Row 3: location with wave height output (but without general result)
+ /// - Row 4: location with flag for parsing the general result set to true
+ /// - Row 5: location with output containing a general result with two top level illustration points
+ ///
+ ///
+ /// The fully configured locations view.
+ protected abstract LocationsView ShowFullyConfiguredLocationsView(Form form);
+
+ ///
+ /// Method for replacing the hydraulic boundary database as well as notifying the observers.
+ ///
+ /// The locations view involved.
+ protected abstract void ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(LocationsView view);
+
+ ///
+ /// Method for clearing all location output as well as notifying the observers.
+ ///
+ /// The locations view involved.
+ protected abstract void ClearLocationOutputAndNotifyObservers(LocationsView view);
+
+ ///
+ /// Method for adding some location output as well as notifying the observers.
+ ///
+ /// The locations view involved.
+ protected abstract void AddLocationOutputAndNotifyObservers(LocationsView view);
+
+ private DataGridView GetLocationsDataGridView()
+ {
+ return ControlTestHelper.GetDataGridView(testForm, "DataGridView");
+ }
+
+ private DataGridViewControl GetLocationsDataGridViewControl()
+ {
+ return ControlTestHelper.GetDataGridViewControl(testForm, "DataGridViewControl");
+ }
+
+ private IllustrationPointsControl GetIllustrationPointsControl()
+ {
+ return ControlTestHelper.GetControls(testForm, "IllustrationPointsControl").Single();
+ }
+
+ private DataGridView GetIllustrationPointsDataGridView()
+ {
+ return ControlTestHelper.GetDataGridView(GetIllustrationPointsControl(), "DataGridView");
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj
===================================================================
diff -u -r58390b8d17ea2843db8980b7020cbfebfcbec6d4 -r3fa158d7e6052014732df99d2a8e0fcad6bd1d18
--- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj (.../Ringtoets.Common.Forms.TestUtil.csproj) (revision 58390b8d17ea2843db8980b7020cbfebfcbec6d4)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj (.../Ringtoets.Common.Forms.TestUtil.csproj) (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18)
@@ -50,7 +50,7 @@
Properties\GlobalAssembly.cs
-
+
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs
===================================================================
diff -u -rd19a65425aed738d0dd4a7c4805501ec0c1863aa -r3fa158d7e6052014732df99d2a8e0fcad6bd1d18
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision d19a65425aed738d0dd4a7c4805501ec0c1863aa)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18)
@@ -459,7 +459,7 @@
}
[TestFixture]
- public class DataSynchronisationTester : LocationsViewDataSynchronisationTester
+ public class DataSynchronizationTester : LocationsViewDataSynchronizationTester
{
protected override int OutputColumnIndex
{
@@ -480,6 +480,26 @@
return ShowFullyConfiguredDesignWaterLevelLocationsView(new ObservableTestAssessmentSectionStub(), form);
}
+ protected override void ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(LocationsView view)
+ {
+ var locations = (ObservableList) view.Data;
+ var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(10, "10", 10.0, 10.0)
+ {
+ DesignWaterLevelCalculation =
+ {
+ InputParameters =
+ {
+ ShouldIllustrationPointsBeCalculated = true
+ },
+ Output = new TestHydraulicBoundaryLocationOutput(10.23)
+ }
+ };
+
+ locations.Clear();
+ locations.Add(hydraulicBoundaryLocation);
+ locations.NotifyObservers();
+ }
+
protected override void ClearLocationOutputAndNotifyObservers(LocationsView view)
{
var locations = (ObservableList) view.Data;
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs
===================================================================
diff -u -rd19a65425aed738d0dd4a7c4805501ec0c1863aa -r3fa158d7e6052014732df99d2a8e0fcad6bd1d18
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision d19a65425aed738d0dd4a7c4805501ec0c1863aa)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18)
@@ -458,7 +458,7 @@
}
[TestFixture]
- public class DataSynchronisationTester : LocationsViewDataSynchronisationTester
+ public class DataSynchronizationTester : LocationsViewDataSynchronizationTester
{
protected override int OutputColumnIndex
{
@@ -479,6 +479,26 @@
return ShowFullyConfiguredWaveHeightLocationsView(new ObservableTestAssessmentSectionStub(), form);
}
+ protected override void ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(LocationsView view)
+ {
+ var locations = (ObservableList) view.Data;
+ var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(10, "10", 10.0, 10.0)
+ {
+ WaveHeightCalculation =
+ {
+ InputParameters =
+ {
+ ShouldIllustrationPointsBeCalculated = true
+ },
+ Output = new TestHydraulicBoundaryLocationOutput(10.23)
+ }
+ };
+
+ locations.Clear();
+ locations.Add(hydraulicBoundaryLocation);
+ locations.NotifyObservers();
+ }
+
protected override void ClearLocationOutputAndNotifyObservers(LocationsView view)
{
var locations = (ObservableList) view.Data;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs
===================================================================
diff -u -rd19a65425aed738d0dd4a7c4805501ec0c1863aa -r3fa158d7e6052014732df99d2a8e0fcad6bd1d18
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision d19a65425aed738d0dd4a7c4805501ec0c1863aa)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18)
@@ -342,7 +342,7 @@
}
[TestFixture]
- public class DataSynchronisationTester : LocationsViewDataSynchronisationTester
+ public class DataSynchronizationTester : LocationsViewDataSynchronizationTester
{
protected override int OutputColumnIndex
{
@@ -365,6 +365,32 @@
return ShowFullyConfiguredDesignWaterLevelLocationsView(form);
}
+ protected override void ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(LocationsView view)
+ {
+ IAssessmentSection assessmentSection = view.AssessmentSection;
+ var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(10, "10", 10.0, 10.0)
+ {
+ WaveHeightCalculation =
+ {
+ InputParameters =
+ {
+ ShouldIllustrationPointsBeCalculated = true
+ },
+ Output = new TestHydraulicBoundaryLocationOutput(10.23)
+ }
+ };
+
+ assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase
+ {
+ Locations =
+ {
+ hydraulicBoundaryLocation
+ }
+ };
+
+ assessmentSection.NotifyObservers();
+ }
+
protected override void ClearLocationOutputAndNotifyObservers(LocationsView view)
{
IAssessmentSection assessmentSection = view.AssessmentSection;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs
===================================================================
diff -u -rd19a65425aed738d0dd4a7c4805501ec0c1863aa -r3fa158d7e6052014732df99d2a8e0fcad6bd1d18
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision d19a65425aed738d0dd4a7c4805501ec0c1863aa)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 3fa158d7e6052014732df99d2a8e0fcad6bd1d18)
@@ -334,7 +334,7 @@
}
[TestFixture]
- public class DataSynchronisationTester : LocationsViewDataSynchronisationTester
+ public class DataSynchronizationTester : LocationsViewDataSynchronizationTester
{
protected override int OutputColumnIndex
{
@@ -357,6 +357,32 @@
return ShowFullyConfiguredWaveHeightLocationsView(form);
}
+ protected override void ReplaceHydraulicBoundaryDatabaseAndNotifyObservers(LocationsView view)
+ {
+ IAssessmentSection assessmentSection = view.AssessmentSection;
+ var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(10, "10", 10.0, 10.0)
+ {
+ WaveHeightCalculation =
+ {
+ InputParameters =
+ {
+ ShouldIllustrationPointsBeCalculated = true
+ },
+ Output = new TestHydraulicBoundaryLocationOutput(10.23)
+ }
+ };
+
+ assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase
+ {
+ Locations =
+ {
+ hydraulicBoundaryLocation
+ }
+ };
+
+ assessmentSection.NotifyObservers();
+ }
+
protected override void ClearLocationOutputAndNotifyObservers(LocationsView view)
{
IAssessmentSection assessmentSection = view.AssessmentSection;