Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -153,7 +153,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( CalculationContextChildNodeObjects, CalculationContextContextMenuStrip, - CalculationContextOnNodeRemoved); + CalculationContextOnNodeRemoved, + CalculationType.Probabilistic); yield return new TreeNodeInfo> { Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -107,7 +107,7 @@ Image image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.HydraulicCalculationIcon, image); + TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.ProbabilisticCalculationIcon, image); } [Test] Index: Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerTreeNodeInfoFactory.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerTreeNodeInfoFactory.cs (.../RiskeerTreeNodeInfoFactory.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerTreeNodeInfoFactory.cs (.../RiskeerTreeNodeInfoFactory.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using System.Drawing; using System.Linq; using System.Windows.Forms; @@ -79,17 +80,25 @@ /// The function for obtaining the child node objects. /// The function for obtaining the context menu strip. /// The action to perform on removing a node. + /// The type of the calculation. /// A object. + /// Thrown when + /// has an invalid value. + /// Thrown when + /// has a valid but not supported value. public static TreeNodeInfo CreateCalculationContextTreeNodeInfo( Func childNodeObjects, Func contextMenuStrip, - Action onNodeRemoved) + Action onNodeRemoved, + CalculationType calculationType) where TCalculationContext : ICalculationContext { + Bitmap image = GetCalculationContextTreeNodeImage(calculationType); + return new TreeNodeInfo { Text = context => context.WrappedData.Name, - Image = context => Resources.HydraulicCalculationIcon, + Image = context => image, EnsureVisibleOnCreate = (context, parent) => true, ChildNodeObjects = childNodeObjects, ContextMenuStrip = contextMenuStrip, @@ -139,6 +148,37 @@ #region Helper methods for CreateCalculationContextTreeNodeInfo + /// + /// Gets the calculation context tree node image based on the given . + /// + /// The to get the image for. + /// A calculation context tree node image. + /// Thrown when + /// has an invalid value. + /// Thrown when + /// has a valid but not supported value. + private static Bitmap GetCalculationContextTreeNodeImage(CalculationType calculationType) + { + if (!Enum.IsDefined(typeof(CalculationType), calculationType)) + { + throw new InvalidEnumArgumentException(nameof(calculationType), + (int) calculationType, + typeof(CalculationType)); + } + + switch (calculationType) + { + case CalculationType.SemiProbabilistic: + return Resources.SemiProbabilisticCalculationIcon; + case CalculationType.Probabilistic: + return Resources.ProbabilisticCalculationIcon; + case CalculationType.Hydraulic: + return Resources.HydraulicCalculationIcon; + default: + throw new NotSupportedException(); + } + } + private static bool CalculationContextCanRemove(ICalculationContext calculationContext, object parentNodeData) { var calculationGroupContext = parentNodeData as ICalculationContext; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerTreeNodeInfoFactoryTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerTreeNodeInfoFactoryTest.cs (.../RiskeerTreeNodeInfoFactoryTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerTreeNodeInfoFactoryTest.cs (.../RiskeerTreeNodeInfoFactoryTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -20,6 +20,8 @@ // All rights reserved. using System; +using System.Collections.Generic; +using System.ComponentModel; using System.Drawing; using System.Linq; using System.Windows.Forms; @@ -602,20 +604,37 @@ #region CreateCalculationContextTreeNodeInfo [Test] - public void CreateCalculationContextTreeNodeInfo_Always_ExpectedPropertiesSet() + public void CreateCalculationContextTreeNodeInfo_InvalidCalculationType_ThrowsInvalidEnumArgumentException() { // Setup - Bitmap icon = RiskeerFormsResources.HydraulicCalculationIcon; Func childNodeObjects = context => new object[0]; Func contextMenuStrip = (context, parent, treeViewControl) => new ContextMenuStrip(); Action onNodeRemoved = (context, parent) => {}; + const CalculationType calculationType = (CalculationType) 99; // Call - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(childNodeObjects, contextMenuStrip, onNodeRemoved); + void Call() => RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(childNodeObjects, contextMenuStrip, onNodeRemoved, calculationType); // Assert + var expectedMessage = $"The value of argument 'calculationType' ({calculationType}) is invalid for Enum type '{nameof(CalculationType)}'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(Call, expectedMessage); + } + + [Test] + [TestCaseSource(nameof(GetCalculationTypes))] + public void CreateCalculationContextTreeNodeInfo_ValidData_ExpectedPropertiesSet(CalculationType calculationType, Bitmap expectedIcon) + { + // Setup + Func childNodeObjects = context => new object[0]; + Func contextMenuStrip = (context, parent, treeViewControl) => new ContextMenuStrip(); + Action onNodeRemoved = (context, parent) => {}; + + // Call + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(childNodeObjects, contextMenuStrip, onNodeRemoved, calculationType); + + // Assert Assert.AreEqual(typeof(TestCalculationContext), treeNodeInfo.TagType); - TestHelper.AssertImagesAreEqual(icon, treeNodeInfo.Image(null)); + TestHelper.AssertImagesAreEqual(expectedIcon, treeNodeInfo.Image(null)); Assert.AreSame(childNodeObjects, treeNodeInfo.ChildNodeObjects); Assert.AreSame(contextMenuStrip, treeNodeInfo.ContextMenuStrip); Assert.AreSame(onNodeRemoved, treeNodeInfo.OnNodeRemoved); @@ -626,21 +645,23 @@ } [Test] - public void TextOfCalculationContextTreeNodeInfo_Always_ReturnsWrappedDataName() + public void TextOfCalculationContextTreeNodeInfo_ValidData_ReturnsWrappedDataName() { // Setup var mocks = new MockRepository(); var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); + var calculationType = new Random(21).NextEnumValue(); + const string calculationName = "calculationName"; var calculation = new TestCalculation { Name = calculationName }; var context = new TestCalculationContext(calculation, new CalculationGroup(), failureMechanism); - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); // Call string text = treeNodeInfo.Text(context); @@ -651,10 +672,11 @@ } [Test] - public void EnsureVisibleOnCreateOfCalculationContextTreeNodeInfo_Always_ReturnsTrue() + public void EnsureVisibleOnCreateOfCalculationContextTreeNodeInfo_ValidData_ReturnsTrue() { // Setup - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + var calculationType = new Random(21).NextEnumValue(); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); // Call bool result = treeNodeInfo.EnsureVisibleOnCreate(null, null); @@ -664,10 +686,11 @@ } [Test] - public void CanRenameCalculationContextTreeNodeInfo_Always_ReturnTrue() + public void CanRenameCalculationContextTreeNodeInfo_ValidData_ReturnTrue() { // Setup - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + var calculationType = new Random(21).NextEnumValue(); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); // Call bool renameAllowed = treeNodeInfo.CanRename(null, null); @@ -677,7 +700,7 @@ } [Test] - public void OnNodeRenamedOfCalculationContextTreeNodeInfo_Always_SetNewNameToCalculationItemAndNotifyObserver() + public void OnNodeRenamedOfCalculationContextTreeNodeInfo_ValidData_SetNewNameToCalculationItemAndNotifyObserver() { // Setup var mocks = new MockRepository(); @@ -686,13 +709,15 @@ var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); + var calculationType = new Random(21).NextEnumValue(); + var calculation = new TestCalculation { Name = "" }; var context = new TestCalculationContext(calculation, new CalculationGroup(), failureMechanism); - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); context.WrappedData.Attach(observer); @@ -717,8 +742,10 @@ var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); + var calculationType = new Random(21).NextEnumValue(); + var context = new TestCalculationContext(calculationToBeRemoved, group, failureMechanism); - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); var groupContext = new TestCalculationGroupContext(group, new CalculationGroup(), failureMechanism); @@ -741,8 +768,10 @@ var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); + var calculationType = new Random(21).NextEnumValue(); + var context = new TestCalculationContext(calculationToBeRemoved, group, failureMechanism); - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); var groupContext = new TestCalculationGroupContext(group, new CalculationGroup(), failureMechanism); @@ -763,8 +792,10 @@ var failureMechanism = mocks.StrictMock(); mocks.ReplayAll(); + var calculationType = new Random(21).NextEnumValue(); + var calculationContext = new TestCalculationContext(new TestCalculation(), new CalculationGroup(), failureMechanism); - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); // Call bool removalAllowed = treeNodeInfo.CanRemove(calculationContext, data); @@ -778,7 +809,8 @@ public void CanDragCalculationContextTreeNodeInfo_Always_ReturnTrue() { // Setup - TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null); + var calculationType = new Random(21).NextEnumValue(); + TreeNodeInfo treeNodeInfo = RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(null, null, null, calculationType); // Call bool canDrag = treeNodeInfo.CanDrag(null, null); @@ -787,6 +819,16 @@ Assert.IsTrue(canDrag); } + private static IEnumerable GetCalculationTypes() + { + return new[] + { + new TestCaseData(CalculationType.Hydraulic, RiskeerFormsResources.HydraulicCalculationIcon), + new TestCaseData(CalculationType.Probabilistic, RiskeerFormsResources.ProbabilisticCalculationIcon), + new TestCaseData(CalculationType.SemiProbabilistic, RiskeerFormsResources.SemiProbabilisticCalculationIcon), + }; + } + #endregion #region CreateFailureMechanismContextTreeNodeInfo Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -297,7 +297,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( CalculationContextChildNodeObjects, CalculationContextContextMenuStrip, - CalculationContextOnNodeRemoved); + CalculationContextOnNodeRemoved, + CalculationType.Probabilistic); yield return new TreeNodeInfo { Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -107,7 +107,7 @@ Image image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.HydraulicCalculationIcon, image); + TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.ProbabilisticCalculationIcon, image); } [Test] Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -239,7 +239,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( WaveConditionsCalculationContextChildNodeObjects, WaveConditionsCalculationContextMenuStrip, - WaveConditionsCalculationContextOnNodeRemoved); + WaveConditionsCalculationContextOnNodeRemoved, + CalculationType.Hydraulic); yield return new TreeNodeInfo> { Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -222,7 +222,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( CalculationContextChildNodeObjects, CalculationContextContextMenuStrip, - CalculationContextOnNodeRemoved); + CalculationContextOnNodeRemoved, + CalculationType.Probabilistic); yield return new TreeNodeInfo { Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -106,7 +106,7 @@ Image image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.HydraulicCalculationIcon, image); + TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.ProbabilisticCalculationIcon, image); } [Test] Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -322,7 +322,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( CalculationContextChildNodeObjects, CalculationContextContextMenuStrip, - CalculationContextOnNodeRemoved); + CalculationContextOnNodeRemoved, + CalculationType.SemiProbabilistic); yield return RiskeerTreeNodeInfoFactory.CreateCalculationGroupContextTreeNodeInfo( CalculationGroupContextChildNodeObjects, Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsCalculationScenarioContextTreeNodeInfoTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -99,7 +99,7 @@ Image image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.HydraulicCalculationIcon, image); + TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.SemiProbabilisticCalculationIcon, image); } [Test] Index: Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -291,12 +291,14 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( SemiProbabilisticCalculationContextChildNodeObjects, SemiProbabilisticCalculationContextContextMenuStrip, - SemiProbabilisticCalculationContextOnNodeRemoved); + SemiProbabilisticCalculationContextOnNodeRemoved, + CalculationType.SemiProbabilistic); yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( ProbabilisticCalculationContextChildNodeObjects, ProbabilisticCalculationContextContextMenuStrip, - ProbabilisticCalculationContextOnNodeRemoved); + ProbabilisticCalculationContextOnNodeRemoved, + CalculationType.Probabilistic); yield return RiskeerTreeNodeInfoFactory.CreateCalculationGroupContextTreeNodeInfo( CalculationGroupContextChildNodeObjects, Index: Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/PipingCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/PipingCalculationScenarioContextTreeNodeInfoTest.cs (.../PipingCalculationScenarioContextTreeNodeInfoTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/PipingCalculationScenarioContextTreeNodeInfoTest.cs (.../PipingCalculationScenarioContextTreeNodeInfoTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -103,7 +103,7 @@ Image image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.HydraulicCalculationIcon, image); + TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.SemiProbabilisticCalculationIcon, image); } [Test] Index: Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/ProbabilisticPipingCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/ProbabilisticPipingCalculationContextTreeNodeInfoTest.cs (.../ProbabilisticPipingCalculationContextTreeNodeInfoTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/ProbabilisticPipingCalculationContextTreeNodeInfoTest.cs (.../ProbabilisticPipingCalculationContextTreeNodeInfoTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -99,7 +99,7 @@ Image image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.HydraulicCalculationIcon, image); + TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.ProbabilisticCalculationIcon, image); } [Test] Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -195,7 +195,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( CalculationContextChildNodeObjects, CalculationContextContextMenuStrip, - CalculationContextOnNodeRemoved); + CalculationContextOnNodeRemoved, + CalculationType.Probabilistic); yield return new TreeNodeInfo { Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs =================================================================== diff -u -r2e5b444e91e9bd39e83725489f1c01505df84f76 -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision 2e5b444e91e9bd39e83725489f1c01505df84f76) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationScenarioContextTreeNodeInfoTest.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -106,7 +106,7 @@ Image image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.HydraulicCalculationIcon, image); + TestHelper.AssertImagesAreEqual(RiskeerCommonFormsResources.ProbabilisticCalculationIcon, image); } [Test] Index: Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -141,7 +141,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( WaveConditionsCalculationContextChildNodeObjects, WaveConditionsCalculationContextContextMenuStrip, - WaveConditionsCalculationContextOnNodeRemoved); + WaveConditionsCalculationContextOnNodeRemoved, + CalculationType.Hydraulic); yield return new TreeNodeInfo { Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs =================================================================== diff -u -r19b2c5d70b929681a14642ab3b7c44300596f97e -rf4359dde195c85255ac1aa2373710dc709f65a56 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 19b2c5d70b929681a14642ab3b7c44300596f97e) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision f4359dde195c85255ac1aa2373710dc709f65a56) @@ -159,7 +159,8 @@ yield return RiskeerTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo( WaveConditionsCalculationContextChildNodeObjects, WaveConditionsCalculationContextContextMenuStrip, - WaveConditionsCalculationContextOnNodeRemoved); + WaveConditionsCalculationContextOnNodeRemoved, + CalculationType.Hydraulic); yield return new TreeNodeInfo {