Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r961c0bdb44b8058e95d8339b1a3bdc826e4ceb9b -re7eb9aa4f8a0657c1537abbc0b9d6a53f74e87d0 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision 961c0bdb44b8058e95d8339b1a3bdc826e4ceb9b) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision e7eb9aa4f8a0657c1537abbc0b9d6a53f74e87d0) @@ -761,6 +761,48 @@ } [Test] + public void ContextMenuStrip_WithForeshoreProfile_ContextMenuItemUpdateForeshoreProfileEnabled() + { + // Setup + var assessmentSectionStub = mocks.Stub(); + var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism + { + Contribution = 5 + }; + var calculation = new GrassCoverErosionOutwardsWaveConditionsCalculation + { + InputParameters = + { + ForeshoreProfile = new TestForeshoreProfile() + } + }; + var nodeData = new GrassCoverErosionOutwardsWaveConditionsCalculationContext(calculation, + failureMechanism, + assessmentSectionStub); + + using (var treeViewControl = new TreeViewControl()) + { + var gui = mocks.Stub(); + gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(new CustomItemsOnlyContextMenuBuilder()); + gui.Stub(cmp => cmp.MainWindow).Return(mocks.Stub()); + mocks.ReplayAll(); + + plugin.Gui = gui; + + // Call + using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) + { + // Assert + TestHelper.AssertContextMenuStripContainsItem(menu, + contextMenuUpdateForeshoreProfileIndex, + "&Bijwerken voorlandprofiel...", + "Berekening bijwerken waar een voorlandprofiel geselecteerd is.", + RingtoetsCommonFormsResources.UpdateItemIcon); + } + } + } + + [Test] [TestCase(true)] [TestCase(false)] public void GivenCalculation_WhenValidating_ThenCalculationValidated(bool validCalculation)