Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationCalculationsContextTreeNodeInfoTest.cs =================================================================== diff -u -recb0e5b29e11012efd3944171530d9310e07804a -ree0a1bf9c52c6de7510683c5febf80d3e9922cf3 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationCalculationsContextTreeNodeInfoTest.cs (.../DuneLocationCalculationsContextTreeNodeInfoTest.cs) (revision ecb0e5b29e11012efd3944171530d9310e07804a) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationCalculationsContextTreeNodeInfoTest.cs (.../DuneLocationCalculationsContextTreeNodeInfoTest.cs) (revision ee0a1bf9c52c6de7510683c5febf80d3e9922cf3) @@ -275,6 +275,64 @@ } [Test] + public void ContextMenuStrip_InvalidNorm_ContextMenuItemCalculateAllDisabledAndTooltipSet() + { + // Setup + string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); + + using (var treeViewControl = new TreeViewControl()) + { + var assessmentSection = mocks.Stub(); + + assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase + { + FilePath = validFilePath, + Version = "1.0" + }); + + var failureMechanism = new DuneErosionFailureMechanism + { + Contribution = 10 + }; + + var duneLocationCalculations = new ObservableList + { + new DuneLocationCalculation(new TestDuneLocation()) + }; + var context = new DuneLocationCalculationsContext(duneLocationCalculations, + failureMechanism, + assessmentSection, + () => 1.0, + "A"); + + var builder = new CustomItemsOnlyContextMenuBuilder(); + + var gui = mocks.Stub(); + gui.Stub(cmp => cmp.Get(context, treeViewControl)).Return(builder); + + mocks.ReplayAll(); + + plugin.Gui = gui; + + failureMechanism.SetDuneLocations(new[] + { + new TestDuneLocation() + }); + + // Call + using (ContextMenuStrip menu = info.ContextMenuStrip(context, null, treeViewControl)) + { + // Assert + TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuCalculateAllIndex, + "Alles be&rekenen", + "Doelkans is te groot om een berekening uit te kunnen voeren.", + RingtoetsCommonFormsResources.CalculateAllIcon, + false); + } + } + } + + [Test] public void ContextMenuStrip_AllRequiredInputSet_ContextMenuItemCalculateAllEnabled() { // Setup