Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/Views/ClosingStructuresCalculationsRowTest.cs =================================================================== diff -u -r2a51780144c02d641ca013462a3b4bdfc52e69a1 -r084841826fac2142498b963305a2265119a0c774 --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/Views/ClosingStructuresCalculationsRowTest.cs (.../ClosingStructuresCalculationsRowTest.cs) (revision 2a51780144c02d641ca013462a3b4bdfc52e69a1) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/Views/ClosingStructuresCalculationsRowTest.cs (.../ClosingStructuresCalculationsRowTest.cs) (revision 084841826fac2142498b963305a2265119a0c774) @@ -35,6 +35,7 @@ using Riskeer.Common.Data.Structures; using Riskeer.Common.Data.TestUtil; using Riskeer.Common.Forms.ChangeHandlers; +using Riskeer.Common.Forms.PresentationObjects; using Riskeer.Common.Forms.PropertyClasses; using Riskeer.Common.Forms.TestUtil; using Riskeer.Common.Forms.Views; @@ -75,8 +76,22 @@ DataGridViewControlColumnStateDefinitionTestHelper.AssertColumnStateDefinition(columnStateDefinitions, useForeshoreColumnIndex); mocks.VerifyAll(); } - + [Test] + public void SelectableHydraulicBoundaryLocation_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() + { + // Setup + var newLocation = new TestHydraulicBoundaryLocation(); + var selectableHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(newLocation, new Point2D(0, 0)); + var newValue = new DataGridViewComboBoxItemWrapper(selectableHydraulicBoundaryLocation); + + var calculation = new StructuresCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); + } + + [Test] public void ForeshoreProfile_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() { // Setup Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsCalculationRowTest.cs =================================================================== diff -u -r8dbe77c4864b019630360007c972593b2e91a753 -r084841826fac2142498b963305a2265119a0c774 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsCalculationRowTest.cs (.../GrassCoverErosionInwardsCalculationRowTest.cs) (revision 8dbe77c4864b019630360007c972593b2e91a753) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsCalculationRowTest.cs (.../GrassCoverErosionInwardsCalculationRowTest.cs) (revision 084841826fac2142498b963305a2265119a0c774) @@ -31,6 +31,7 @@ using Riskeer.Common.Data.FailureMechanism; using Riskeer.Common.Data.TestUtil; using Riskeer.Common.Forms.ChangeHandlers; +using Riskeer.Common.Forms.PresentationObjects; using Riskeer.Common.Forms.PropertyClasses; using Riskeer.Common.Forms.TestUtil; using Riskeer.Common.Forms.Views; @@ -76,6 +77,20 @@ } [Test] + public void SelectableHydraulicBoundaryLocation_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() + { + // Setup + var newLocation = new TestHydraulicBoundaryLocation(); + var selectableHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(newLocation, new Point2D(0, 0)); + var newValue = new DataGridViewComboBoxItemWrapper(selectableHydraulicBoundaryLocation); + + var calculation = new GrassCoverErosionInwardsCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); + } + + [Test] public void DikeProfile_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() { // Setup Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/Views/HeightStructuresCalculationRowTest.cs =================================================================== diff -u -rd0f0b648278dbf68268d5514d3b2544805b1b305 -r084841826fac2142498b963305a2265119a0c774 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/Views/HeightStructuresCalculationRowTest.cs (.../HeightStructuresCalculationRowTest.cs) (revision d0f0b648278dbf68268d5514d3b2544805b1b305) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/Views/HeightStructuresCalculationRowTest.cs (.../HeightStructuresCalculationRowTest.cs) (revision 084841826fac2142498b963305a2265119a0c774) @@ -32,6 +32,7 @@ using Riskeer.Common.Data.Structures; using Riskeer.Common.Data.TestUtil; using Riskeer.Common.Forms.ChangeHandlers; +using Riskeer.Common.Forms.PresentationObjects; using Riskeer.Common.Forms.PropertyClasses; using Riskeer.Common.Forms.TestUtil; using Riskeer.Common.Forms.Views; @@ -77,6 +78,20 @@ } [Test] + public void SelectableHydraulicBoundaryLocation_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() + { + // Setup + var newLocation = new TestHydraulicBoundaryLocation(); + var selectableHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(newLocation, new Point2D(0, 0)); + var newValue = new DataGridViewComboBoxItemWrapper(selectableHydraulicBoundaryLocation); + + var calculation = new StructuresCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); + } + + [Test] public void ForeshoreProfile_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() { // Setup Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs =================================================================== diff -u -r1d87f0ce3727b1ef85f5d9e739bc642bddf960a4 -r084841826fac2142498b963305a2265119a0c774 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs (.../MacroStabilityInwardsCalculationRowTest.cs) (revision 1d87f0ce3727b1ef85f5d9e739bc642bddf960a4) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsCalculationRowTest.cs (.../MacroStabilityInwardsCalculationRowTest.cs) (revision 084841826fac2142498b963305a2265119a0c774) @@ -168,27 +168,6 @@ SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); } - [Test] - public void SelectableHydraulicBoundaryLocation_ChangeToEqualValue_NoNotificationsOutputNotCleared() - { - // Setup - DataGridViewComboBoxItemWrapper oldValue = null; - - // Call - AssertPropertyNotChanged( - row => - { - oldValue = row.SelectableHydraulicBoundaryLocation; - row.SelectableHydraulicBoundaryLocation = row.SelectableHydraulicBoundaryLocation; - }, - calculation => - { - // Assert - Assert.NotNull(oldValue); - Assert.AreEqual(oldValue.WrappedObject.HydraulicBoundaryLocation, calculation.InputParameters.HydraulicBoundaryLocation); - }); - } - /// /// Asserts that the output of a remains /// unaffected (and therefore no change notification occurring) when the input for Index: Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/PipingCalculationRowTest.cs =================================================================== diff -u -r72b35179da7cece144a0319a96122cf3eba0192c -r084841826fac2142498b963305a2265119a0c774 --- Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision 72b35179da7cece144a0319a96122cf3eba0192c) +++ Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision 084841826fac2142498b963305a2265119a0c774) @@ -190,27 +190,6 @@ } [Test] - public void SelectableHydraulicBoundaryLocation_ChangeToEqualValue_NoNotificationsOutputNotCleared() - { - // Setup - DataGridViewComboBoxItemWrapper oldValue = null; - - // Call - AssertPropertyNotChanged( - row => - { - oldValue = row.SelectableHydraulicBoundaryLocation; - row.SelectableHydraulicBoundaryLocation = row.SelectableHydraulicBoundaryLocation; - }, - calculation => - { - // Assert - Assert.NotNull(oldValue); - Assert.AreEqual(oldValue.WrappedObject.HydraulicBoundaryLocation, calculation.InputParameters.HydraulicBoundaryLocation); - }); - } - - [Test] public void DampingFactorExitMean_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() { // Setup Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresCalculationRowTest.cs =================================================================== diff -u -r85f99d0f373b5ccc84747cd1db01c6039cb58053 -r084841826fac2142498b963305a2265119a0c774 --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresCalculationRowTest.cs (.../StabilityPointStructuresCalculationRowTest.cs) (revision 85f99d0f373b5ccc84747cd1db01c6039cb58053) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresCalculationRowTest.cs (.../StabilityPointStructuresCalculationRowTest.cs) (revision 084841826fac2142498b963305a2265119a0c774) @@ -32,6 +32,7 @@ using Riskeer.Common.Data.Structures; using Riskeer.Common.Data.TestUtil; using Riskeer.Common.Forms.ChangeHandlers; +using Riskeer.Common.Forms.PresentationObjects; using Riskeer.Common.Forms.PropertyClasses; using Riskeer.Common.Forms.TestUtil; using Riskeer.Common.Forms.Views; @@ -85,6 +86,20 @@ } [Test] + public void SelectableHydraulicBoundaryLocation_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() + { + // Setup + var newLocation = new TestHydraulicBoundaryLocation(); + var selectableHydraulicBoundaryLocation = new SelectableHydraulicBoundaryLocation(newLocation, new Point2D(0, 0)); + var newValue = new DataGridViewComboBoxItemWrapper(selectableHydraulicBoundaryLocation); + + var calculation = new StructuresCalculationScenario(); + + // Call & Assert + SetPropertyAndVerifyNotificationsAndOutputForCalculation(row => row.SelectableHydraulicBoundaryLocation = newValue, calculation); + } + + [Test] public void ForeshoreProfile_AlwaysOnChange_NotifyObserverAndCalculationPropertyChanged() { // Setup