Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/Properties/Resources.Designer.cs =================================================================== diff -u -reba50216c7c95008e2f5ea4dc238551bfc01d878 -r7f9e873cc6686f11129e65e56371f8f7930d8264 --- Riskeer/Integration/src/Riskeer.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision eba50216c7c95008e2f5ea4dc238551bfc01d878) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7f9e873cc6686f11129e65e56371f8f7930d8264) @@ -495,6 +495,18 @@ } /// + /// Looks up a localized string similar to Als u deze doelkans verwijdert, dan wordt de uitvoer van alle ervan afhankelijke berekeningen verwijderd. + /// + ///Weet u zeker dat u wilt doorgaan?. + /// + public static string RiskeerPlugin_GetTreeNodeInfos_HydraulicBoundaryDatabaseUpdateHandler_Confirm_remove_TargetProbability { + get { + return ResourceManager.GetString("RiskeerPlugin_GetTreeNodeInfos_HydraulicBoundaryDatabaseUpdateHandler_Confirm_rem" + + "ove_TargetProbability", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Als u voorlandprofielen importeert, dan worden de resultaten van alle berekeningen in dit toetsspoor die voorlandprofielen gebruiken verwijderd. /// ///Weet u zeker dat u wilt doorgaan?. Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/Properties/Resources.resx =================================================================== diff -u -reba50216c7c95008e2f5ea4dc238551bfc01d878 -r7f9e873cc6686f11129e65e56371f8f7930d8264 --- Riskeer/Integration/src/Riskeer.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision eba50216c7c95008e2f5ea4dc238551bfc01d878) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision 7f9e873cc6686f11129e65e56371f8f7930d8264) @@ -303,4 +303,9 @@ zip archief + + Als u deze doelkans verwijdert, dan wordt de uitvoer van alle ervan afhankelijke berekeningen verwijderd. + +Weet u zeker dat u wilt doorgaan? + \ No newline at end of file Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs =================================================================== diff -u -reba50216c7c95008e2f5ea4dc238551bfc01d878 -r7f9e873cc6686f11129e65e56371f8f7930d8264 --- Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision eba50216c7c95008e2f5ea4dc238551bfc01d878) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision 7f9e873cc6686f11129e65e56371f8f7930d8264) @@ -1039,6 +1039,7 @@ Text = context => noProbabilityValueDoubleConverter.ConvertToString(context.WrappedData.TargetProbability), Image = context => RiskeerCommonFormsResources.GenericInputOutputIcon, EnsureVisibleOnCreate = (context, o) => true, + BeforeNodeRemoveText = context => Resources.RiskeerPlugin_GetTreeNodeInfos_HydraulicBoundaryDatabaseUpdateHandler_Confirm_remove_TargetProbability, CanRemove = (context, o) => true, OnNodeRemoved = WaterLevelHydraulicBoundaryCalculationsForUserDefinedTargetProbabilityOnNodeRemoved, ContextMenuStrip = WaterLevelCalculationsForUserDefinedTargetProbabilityContextMenuStrip, @@ -1061,6 +1062,7 @@ Text = context => noProbabilityValueDoubleConverter.ConvertToString(context.WrappedData.TargetProbability), Image = context => RiskeerCommonFormsResources.GenericInputOutputIcon, EnsureVisibleOnCreate = (context, o) => true, + BeforeNodeRemoveText = context => Resources.RiskeerPlugin_GetTreeNodeInfos_HydraulicBoundaryDatabaseUpdateHandler_Confirm_remove_TargetProbability, CanRemove = (context, o) => true, OnNodeRemoved = HydraulicBoundaryCalculationsForUserDefinedTargetProbabilityOnNodeRemoved, ContextMenuStrip = WaveHeightCalculationsForUserDefinedTargetProbabilityContextMenuStrip, Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/WaterLevelCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs =================================================================== diff -u -r14e0d9ad8a8996b447a17f09f34faf2f70a62a3d -r7f9e873cc6686f11129e65e56371f8f7930d8264 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/WaterLevelCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs) (revision 14e0d9ad8a8996b447a17f09f34faf2f70a62a3d) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/WaterLevelCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs) (revision 7f9e873cc6686f11129e65e56371f8f7930d8264) @@ -92,6 +92,7 @@ Assert.IsNull(info.CanRename); Assert.IsNull(info.OnNodeRenamed); Assert.IsNotNull(info.CanRemove); + Assert.IsNotNull(info.BeforeNodeRemoveText); Assert.IsNotNull(info.OnNodeRemoved); Assert.IsNull(info.CanCheck); Assert.IsNull(info.CheckedState); @@ -176,6 +177,26 @@ } [Test] + public void BeforeRemoveNodeText_Always_ReturnsConfirmationMessage() + { + // Setup + using (var plugin = new RiskeerPlugin()) + { + TreeNodeInfo info = GetInfo(plugin); + + // Call + string beforeNodeRemoveText = info.BeforeNodeRemoveText(null); + + // Assert + string expectedText = "Als u deze doelkans verwijdert, dan wordt de uitvoer van alle ervan afhankelijke berekeningen verwijderd." + + Environment.NewLine + + Environment.NewLine + + "Weet u zeker dat u wilt doorgaan?"; + Assert.AreEqual(expectedText, beforeNodeRemoveText); + } + } + + [Test] public void OnNodeRemoved_WithContexts_RemovesItemAndNotifiesObservers() { // Setup Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/WaveHeightCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs =================================================================== diff -u -r5be9a0a80e227564f3c625f434437b4dd99fcfb7 -r7f9e873cc6686f11129e65e56371f8f7930d8264 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/WaveHeightCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs) (revision 5be9a0a80e227564f3c625f434437b4dd99fcfb7) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/TreeNodeInfos/WaveHeightCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityContextTreeNodeInfoTest.cs) (revision 7f9e873cc6686f11129e65e56371f8f7930d8264) @@ -84,6 +84,7 @@ Assert.IsNull(info.CanRename); Assert.IsNull(info.OnNodeRenamed); Assert.IsNotNull(info.CanRemove); + Assert.IsNotNull(info.BeforeNodeRemoveText); Assert.IsNotNull(info.OnNodeRemoved); Assert.IsNull(info.CanCheck); Assert.IsNull(info.CheckedState); @@ -168,6 +169,26 @@ } [Test] + public void BeforeRemoveNodeText_Always_ReturnsConfirmationMessage() + { + // Setup + using (var plugin = new RiskeerPlugin()) + { + TreeNodeInfo info = GetInfo(plugin); + + // Call + string beforeNodeRemoveText = info.BeforeNodeRemoveText(null); + + // Assert + string expectedText = "Als u deze doelkans verwijdert, dan wordt de uitvoer van alle ervan afhankelijke berekeningen verwijderd." + + Environment.NewLine + + Environment.NewLine + + "Weet u zeker dat u wilt doorgaan?"; + Assert.AreEqual(expectedText, beforeNodeRemoveText); + } + } + + [Test] public void OnNodeRemoved_WithContexts_RemovesItemAndNotifiesObservers() { // Setup