Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -ra5115968c170dddb9ef42d207adcc4195cacc892 -r637378cd38221181a6e221c881fd34260641e788 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTreeNodeInfoTest.cs) (revision a5115968c170dddb9ef42d207adcc4195cacc892) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightCalculationsGroupContextTreeNodeInfoTest.cs) (revision 637378cd38221181a6e221c881fd34260641e788) @@ -164,6 +164,47 @@ } [Test] + public void ContextMenuStrip_FailureMechanismContributionZero_ContextMenuItemCalculateAllDisabledAndTooltipSet() + { + // Setup + var mockRepository = new MockRepository(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(mockRepository); + + var context = new GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext(new ObservableList(), + new GrassCoverErosionOutwardsFailureMechanism(), + assessmentSection); + + using (var treeViewControl = new TreeViewControl()) + { + var gui = mockRepository.Stub(); + gui.Stub(cmp => cmp.Get(context, treeViewControl)).Return(new CustomItemsOnlyContextMenuBuilder()); + gui.Stub(g => g.MainWindow).Return(mockRepository.Stub()); + mockRepository.ReplayAll(); + + using (var plugin = new GrassCoverErosionOutwardsPlugin()) + { + TreeNodeInfo info = GetInfo(plugin); + plugin.Gui = gui; + plugin.Activate(); + + // Call + using (ContextMenuStrip menu = info.ContextMenuStrip(context, null, treeViewControl)) + { + // Assert + TestHelper.AssertContextMenuStripContainsItem(menu, + contextMenuRunWaveHeightCalculationsIndex, + "Alles be&rekenen", + "De bijdrage van dit toetsspoor is nul.", + RingtoetsCommonFormsResources.CalculateAllIcon, + false); + } + } + } + + mockRepository.VerifyAll(); + } + + [Test] [Apartment(ApartmentState.STA)] public void CalculateWaveHeightsFromContextMenu_AllRequiredInputSet_SendsRightInputToCalculationService() {