Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r3d95e2d4d19772aab17604346c7a6def74bb1192 -rcb0d03fc7dc4db4769d2ae9dfb9da263172486cb --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 3d95e2d4d19772aab17604346c7a6def74bb1192) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision cb0d03fc7dc4db4769d2ae9dfb9da263172486cb) @@ -350,7 +350,7 @@ contextMenuUpdateStructureIndex, "&Bijwerken kunstwerk...", "Er zijn geen wijzigingen om bij te werken.", - RingtoetsCommonFormsResources.UpdateItemIcon, + RingtoetsCommonFormsResources.UpdateItemIcon, false); } } @@ -440,52 +440,6 @@ } [Test] - public void GivenCalculationWithOutputAndInputInSync_WhenUpdateStructureClicked_ThenNoInquiryAndCalculationNotUpdatedAndObserversNotNotified() - { - // Given - var assessmentSection = mocks.Stub(); - var structure = new TestClosingStructure(); - var calculation = new StructuresCalculation - { - InputParameters = - { - Structure = structure - }, - Output = new TestStructuresOutput() - }; - - ClosingStructuresInput calculationInput = calculation.InputParameters; - var failureMechanism = new ClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); - - var inputObserver = mocks.StrictMock(); - calculationInput.Attach(inputObserver); - - var calculationObserver = mocks.StrictMock(); - calculation.Attach(calculationObserver); - - using (var treeViewControl = new TreeViewControl()) - { - var mainWindow = mocks.Stub(); - gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(new CustomItemsOnlyContextMenuBuilder()); - gui.Stub(g => g.MainWindow).Return(mainWindow); - mocks.ReplayAll(); - - using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, assessmentSection, treeViewControl)) - { - // When - menu.Items[contextMenuUpdateStructureIndex].PerformClick(); - - // Then - Assert.IsTrue(calculation.HasOutput); - Assert.IsTrue(calculation.InputParameters.IsStructureInputSynchronized); - - // Note: observer assertions are verified in the TearDown() - } - } - } - - [Test] public void GivenCalculationWithOutputAndInputOutOfSync_WhenUpdateStructureClickedAndCancelled_ThenInquiryAndCalculationNotUpdatedAndObserversNotNotified() { // Given @@ -948,7 +902,7 @@ } string expectedMessageBoxText = "Als u kiest voor bijwerken, dan wordt het resultaat van deze berekening " + - $"verwijderd.{Environment.NewLine}{Environment.NewLine}Weet u zeker dat u wilt doorgaan?"; + $"verwijderd.{Environment.NewLine}{Environment.NewLine}Weet u zeker dat u wilt doorgaan?"; Assert.AreEqual(expectedMessageBoxText, messageBoxText); } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r3d95e2d4d19772aab17604346c7a6def74bb1192 -rcb0d03fc7dc4db4769d2ae9dfb9da263172486cb --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 3d95e2d4d19772aab17604346c7a6def74bb1192) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision cb0d03fc7dc4db4769d2ae9dfb9da263172486cb) @@ -446,53 +446,6 @@ } [Test] - public void GivenCalculationWithOutputAndInputInSync_WhenUpdateStructureClicked_ThenNoInquiryAndCalculationNotUpdatedAndObserversNotNotified() - { - // Given - var assessmentSection = mocks.Stub(); - var structure = new TestHeightStructure(); - var calculation = new StructuresCalculation - { - InputParameters = - { - Structure = structure - }, - Output = new TestStructuresOutput() - }; - var failureMechanism = new HeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); - - var inputObserver = mocks.StrictMock(); - calculation.InputParameters.Attach(inputObserver); - - var calculationObserver = mocks.StrictMock(); - calculation.Attach(calculationObserver); - - using (var treeViewControl = new TreeViewControl()) - { - var mainWindow = mocks.Stub(); - var gui = mocks.Stub(); - gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(new CustomItemsOnlyContextMenuBuilder()); - gui.Stub(g => g.MainWindow).Return(mainWindow); - mocks.ReplayAll(); - - plugin.Gui = gui; - - using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, assessmentSection, treeViewControl)) - { - // When - menu.Items[contextMenuUpdateStructureIndex].PerformClick(); - - // Then - Assert.IsTrue(calculation.HasOutput); - Assert.IsTrue(calculation.InputParameters.IsStructureInputSynchronized); - - // Note: observer assertions are verified in the TearDown() - } - } - } - - [Test] public void GivenCalculationWithOutputAndInputOutOfSync_WhenUpdateStructureClickedAndCancelled_ThenInquiryAndCalculationNotUpdatedAndObserversNotNotified() { // Given Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -reda792edf991acda76154e8f2d4802944cea1e25 -rcb0d03fc7dc4db4769d2ae9dfb9da263172486cb --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision eda792edf991acda76154e8f2d4802944cea1e25) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision cb0d03fc7dc4db4769d2ae9dfb9da263172486cb) @@ -445,55 +445,6 @@ } [Test] - public void GivenCalculationWithOutputAndInputInSync_WhenUpdateStructureClicked_ThenNoInquiryAndCalculationNotUpdatedAndObserversNotNotified() - { - // Given - var assessmentSection = mocks.Stub(); - var structure = new TestStabilityPointStructure(); - var calculation = new StructuresCalculation - { - InputParameters = - { - Structure = structure - }, - Output = new TestStructuresOutput() - }; - - StabilityPointStructuresInput calculationInput = calculation.InputParameters; - var failureMechanism = new StabilityPointStructuresFailureMechanism(); - var nodeData = new StabilityPointStructuresCalculationContext(calculation, failureMechanism, assessmentSection); - - var inputObserver = mocks.StrictMock(); - calculationInput.Attach(inputObserver); - - var calculationObserver = mocks.StrictMock(); - calculation.Attach(calculationObserver); - - using (var treeViewControl = new TreeViewControl()) - { - var gui = mocks.Stub(); - var mainWindow = mocks.Stub(); - gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(new CustomItemsOnlyContextMenuBuilder()); - gui.Stub(g => g.MainWindow).Return(mainWindow); - mocks.ReplayAll(); - - plugin.Gui = gui; - - using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, assessmentSection, treeViewControl)) - { - // When - menu.Items[contextMenuUpdateStructureIndex].PerformClick(); - - // Then - Assert.IsTrue(calculation.HasOutput); - Assert.IsTrue(calculation.InputParameters.IsStructureInputSynchronized); - - // Note: observer assertions are verified in the TearDown() - } - } - } - - [Test] [TestCase(true)] [TestCase(false)] public void GivenCalculationWithOutputAndWithInputOutOfSync_WhenUpdateStructureClicked_ThenInquiryAndExpectedOutputAndNotifications(bool continuation)