Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingSemiProbabilisticOutput.cs
===================================================================
diff -u -r019c82bf6273ff150976c8c2ea9b895258951455 -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingSemiProbabilisticOutput.cs (.../PipingSemiProbabilisticOutput.cs) (revision 019c82bf6273ff150976c8c2ea9b895258951455)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingSemiProbabilisticOutput.cs (.../PipingSemiProbabilisticOutput.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -9,14 +9,36 @@
///
/// Creates a new instance of .
///
- public PipingSemiProbabilisticOutput()
+ /// The factor of safety for the uplift sub calculation.
+ /// The factor of safety for the heave sub calculation.
+ /// The factor of safety for the Sellmeijer sub calculation.
+ /// The factor of safety for the piping failure mechanims.
+ public PipingSemiProbabilisticOutput(double upliftFactorOfSafety, double heaveFactorOfSafety, double sellmeijerFactorOfSafety, double pipingFactorOfSafety)
{
- PipingFactorOfSafety = double.NaN;
+ UpliftFactorOfSafety = upliftFactorOfSafety;
+ HeaveFactorOfSafety = heaveFactorOfSafety;
+ SellmeijerFactorOfSafety = sellmeijerFactorOfSafety;
+ PipingFactorOfSafety = pipingFactorOfSafety;
}
///
/// Gets or sets the factor of safety of the piping failure mechanism.
///
- public double PipingFactorOfSafety { get; set; }
+ public double PipingFactorOfSafety { get; private set; }
+
+ ///
+ /// The factor of safety for the uplift sub calculation.
+ ///
+ public double UpliftFactorOfSafety { get; private set; }
+
+ ///
+ /// The factor of safety for the heave sub calculation.
+ ///
+ public double HeaveFactorOfSafety { get; private set; }
+
+ ///
+ /// The factor of safety for the Sellmeijer sub calculation.
+ ///
+ public double SellmeijerFactorOfSafety { get; private set; }
}
}
\ No newline at end of file
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs
===================================================================
diff -u -r8b85f978c7bbe5c29a6ada6509f14d0462b8b9c3 -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 8b85f978c7bbe5c29a6ada6509f14d0462b8b9c3)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -1166,6 +1166,24 @@
}
///
+ /// Looks up a localized string similar to De veiligheidsfactor voor het piping faalmechanisme..
+ ///
+ public static string PipingOutput_PipingFactorOfSafety_Description {
+ get {
+ return ResourceManager.GetString("PipingOutput_PipingFactorOfSafety_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Veiligheidsfactor [-].
+ ///
+ public static string PipingOutput_PipingFactorOfSafety_DisplayName {
+ get {
+ return ResourceManager.GetString("PipingOutput_PipingFactorOfSafety_DisplayName", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Piping resultaten.
///
public static string PipingOutput_Properties_DisplayName {
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx
===================================================================
diff -u -r8b85f978c7bbe5c29a6ada6509f14d0462b8b9c3 -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision 8b85f978c7bbe5c29a6ada6509f14d0462b8b9c3)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -604,4 +604,10 @@
Grondeigenschappen
+
+ De veiligheidsfactor voor het piping faalmechanisme.
+
+
+ Veiligheidsfactor [-]
+
\ No newline at end of file
Fisheye: Tag 746902d8ff996441c8d885dbea8bc605fcee8239 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingOutputProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingSemiProbabilisticOutputProperties.cs
===================================================================
diff -u
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingSemiProbabilisticOutputProperties.cs (revision 0)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingSemiProbabilisticOutputProperties.cs (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -0,0 +1,54 @@
+using Core.Common.Gui.PropertyBag;
+using Core.Common.Utils.Attributes;
+using Ringtoets.Piping.Data;
+using Ringtoets.Piping.Forms.Properties;
+
+namespace Ringtoets.Piping.Forms.PropertyClasses
+{
+ public class PipingSemiProbabilisticOutputProperties : ObjectProperties
+ {
+ [ResourcesCategory(typeof(Resources), "Categories_General")]
+ [ResourcesDisplayName(typeof(Resources), "PipingOutput_HeaveFactorOfSafety_DisplayName")]
+ [ResourcesDescription(typeof(Resources), "PipingOutput_HeaveFactorOfSafety_Description")]
+ public double HeaveFactorOfSafety
+ {
+ get
+ {
+ return data.HeaveFactorOfSafety;
+ }
+ }
+
+ [ResourcesCategory(typeof(Resources), "Categories_General")]
+ [ResourcesDisplayName(typeof(Resources), "PipingOutput_UpliftFactorOfSafety_DisplayName")]
+ [ResourcesDescription(typeof(Resources), "PipingOutput_UpliftFactorOfSafety_Description")]
+ public double UpliftFactorOfSafety
+ {
+ get
+ {
+ return data.UpliftFactorOfSafety;
+ }
+ }
+
+ [ResourcesCategory(typeof(Resources), "Categories_General")]
+ [ResourcesDisplayName(typeof(Resources), "PipingOutput_SellmeijerFactorOfSafety_DisplayName")]
+ [ResourcesDescription(typeof(Resources), "PipingOutput_SellmeijerFactorOfSafety_Description")]
+ public double SellmeijerFactorOfSafety
+ {
+ get
+ {
+ return data.SellmeijerFactorOfSafety;
+ }
+ }
+
+ [ResourcesCategory(typeof(Resources), "Categories_General")]
+ [ResourcesDisplayName(typeof(Resources), "PipingOutput_PipingFactorOfSafety_DisplayName")]
+ [ResourcesDescription(typeof(Resources), "PipingOutput_PipingFactorOfSafety_Description")]
+ public double PipingFactorOfSafety
+ {
+ get
+ {
+ return data.PipingFactorOfSafety;
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj
===================================================================
diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -69,7 +69,7 @@
-
+
Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs
===================================================================
diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -61,7 +61,7 @@
yield return new PropertyInfo();
yield return new PropertyInfo();
yield return new PropertyInfo();
- yield return new PropertyInfo();
+ yield return new PropertyInfo();
yield return new PropertyInfo();
yield return new PropertyInfo();
}
@@ -176,7 +176,7 @@
.Build()
};
- yield return new TreeNodeInfo
+ yield return new TreeNodeInfo
{
Text = pipingOutput => PipingFormsResources.PipingOutput_DisplayName,
Image = pipingOutput => PipingFormsResources.PipingOutputIcon,
@@ -442,7 +442,7 @@
if (pipingCalculationContext.WrappedData.HasOutput)
{
- childNodes.Add(pipingCalculationContext.WrappedData.Output);
+ childNodes.Add(pipingCalculationContext.WrappedData.SemiProbabilisticOutput);
childNodes.Add(new EmptyPipingCalculationReport());
}
else
Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingSemiProbabilisticCalculationService.cs
===================================================================
diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingSemiProbabilisticCalculationService.cs (.../PipingSemiProbabilisticCalculationService.cs) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingSemiProbabilisticCalculationService.cs (.../PipingSemiProbabilisticCalculationService.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -33,19 +33,21 @@
var pipingOutput = calculation.Output;
var calculator = new PipingSemiProbabilisticCalculationService(
- pipingOutput.SellmeijerFactorOfSafety,
- pipingOutput.UpliftFactorOfSafety,
+ pipingOutput.UpliftFactorOfSafety,
pipingOutput.HeaveFactorOfSafety,
+ pipingOutput.SellmeijerFactorOfSafety,
semiProbabilisticParameters.Norm,
semiProbabilisticParameters.A,
semiProbabilisticParameters.B,
semiProbabilisticParameters.SectionLength,
semiProbabilisticParameters.Contribution/100);
- calculation.SemiProbabilisticOutput = new PipingSemiProbabilisticOutput
- {
- PipingFactorOfSafety = calculator.FactorOfSafety()
- };
+ calculation.SemiProbabilisticOutput = new PipingSemiProbabilisticOutput(
+ pipingOutput.UpliftFactorOfSafety,
+ pipingOutput.HeaveFactorOfSafety,
+ pipingOutput.SellmeijerFactorOfSafety,
+ calculator.FactorOfSafety()
+ );
}
private static void ValidateOutputOnCalculation(PipingCalculation calculation)
@@ -59,15 +61,15 @@
///
/// Creates a new instance of .
///
- ///
- ///
- ///
+ /// The factor of safety for the uplift sub calculation.
+ /// The factor of safety for the heave sub calculation.
+ /// The factor of safety for the Sellmeijer sub calculation.
/// The return period.
/// The constant a.
/// The constant b.
/// The length of the assessment section.
/// The contribution of piping to the total failure.
- public PipingSemiProbabilisticCalculationService(double sellmeijerFactorOfSafety, double upliftFactorOfSafety, double heaveFactorOfSafety, int returnPeriod, double constantA, double constantB, double assessmentSectionLength, double contribution)
+ public PipingSemiProbabilisticCalculationService(double upliftFactorOfSafety, double heaveFactorOfSafety, double sellmeijerFactorOfSafety, int returnPeriod, double constantA, double constantB, double assessmentSectionLength, double contribution)
{
this.heaveFactorOfSafety = heaveFactorOfSafety;
this.upliftFactorOfSafety = upliftFactorOfSafety;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingSemiProbabilisticOutputTest.cs
===================================================================
diff -u -r019c82bf6273ff150976c8c2ea9b895258951455 -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingSemiProbabilisticOutputTest.cs (.../PipingSemiProbabilisticOutputTest.cs) (revision 019c82bf6273ff150976c8c2ea9b895258951455)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingSemiProbabilisticOutputTest.cs (.../PipingSemiProbabilisticOutputTest.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -1,4 +1,5 @@
-using NUnit.Framework;
+using System;
+using NUnit.Framework;
namespace Ringtoets.Piping.Data.Test
{
@@ -7,11 +8,21 @@
[Test]
public void Constructor_DefaultPropertiesSet()
{
+ // Setup
+ var random = new Random(21);
+ double upliftFactorOfSafety = random.NextDouble();
+ double heaveFactorOfSafety = random.NextDouble();
+ double sellmeijerFactorOfSafety = random.NextDouble();
+ double pipingFactorOfSafety = random.NextDouble();
+
// Call
- var output = new PipingSemiProbabilisticOutput();
+ var output = new PipingSemiProbabilisticOutput(upliftFactorOfSafety, heaveFactorOfSafety, sellmeijerFactorOfSafety, pipingFactorOfSafety);
// Assert
- Assert.IsNaN(output.PipingFactorOfSafety);
+ Assert.AreEqual(upliftFactorOfSafety, output.UpliftFactorOfSafety);
+ Assert.AreEqual(heaveFactorOfSafety, output.HeaveFactorOfSafety);
+ Assert.AreEqual(sellmeijerFactorOfSafety, output.SellmeijerFactorOfSafety);
+ Assert.AreEqual(pipingFactorOfSafety, output.PipingFactorOfSafety);
}
}
}
\ No newline at end of file
Fisheye: Tag 746902d8ff996441c8d885dbea8bc605fcee8239 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingOutputPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingSemiProbabilisticOutputPropertiesTest.cs
===================================================================
diff -u
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingSemiProbabilisticOutputPropertiesTest.cs (revision 0)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingSemiProbabilisticOutputPropertiesTest.cs (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -0,0 +1,52 @@
+using System;
+using Core.Common.Gui.PropertyBag;
+using NUnit.Framework;
+using Ringtoets.Piping.Data;
+using Ringtoets.Piping.Forms.PropertyClasses;
+
+namespace Ringtoets.Piping.Forms.Test.PropertyClasses
+{
+ [TestFixture]
+ public class PipingSemiProbabilisticOutputPropertiesTest
+ {
+ [Test]
+ public void DefaultConstructor_ExpectedValues()
+ {
+ // Call
+ var properties = new PipingSemiProbabilisticOutputProperties();
+
+ // Assert
+ Assert.IsInstanceOf>(properties);
+ Assert.IsNull(properties.Data);
+ }
+
+ [Test]
+ public void GetProperties_WithData_ReturnExpectedValues()
+ {
+ // Setup
+ var random = new Random(22);
+
+ double upliftFactorOfSafety = random.NextDouble();
+ double heaveFactorOfSafety = random.NextDouble();
+ double sellmeijerFactorOfSafety = random.NextDouble();
+ double pipingFactorOfSafety = random.NextDouble();
+
+ var semiProbabilisticOutput = new PipingSemiProbabilisticOutput(
+ upliftFactorOfSafety,
+ heaveFactorOfSafety,
+ sellmeijerFactorOfSafety,
+ pipingFactorOfSafety);
+
+ var properties = new PipingSemiProbabilisticOutputProperties
+ {
+ Data = semiProbabilisticOutput
+ };
+
+ // Call & Assert
+ Assert.AreEqual(upliftFactorOfSafety, properties.UpliftFactorOfSafety);
+ Assert.AreEqual(heaveFactorOfSafety, properties.HeaveFactorOfSafety);
+ Assert.AreEqual(sellmeijerFactorOfSafety, properties.SellmeijerFactorOfSafety);
+ Assert.AreEqual(pipingFactorOfSafety, properties.PipingFactorOfSafety);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj
===================================================================
diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -62,6 +62,7 @@
+
@@ -74,15 +75,14 @@
-
+
-
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs
===================================================================
diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -166,7 +166,7 @@
Assert.AreSame(pipingCalculationContext.WrappedData.InputParameters, pipingInputContext.WrappedData);
CollectionAssert.AreEqual(pipingCalculationContext.AvailablePipingSurfaceLines, pipingInputContext.AvailablePipingSurfaceLines);
CollectionAssert.AreEqual(pipingCalculationContext.AvailablePipingSoilProfiles, pipingInputContext.AvailablePipingSoilProfiles);
- Assert.AreSame(pipingCalculationContext.WrappedData.Output, children[2]);
+ Assert.AreSame(pipingCalculationContext.WrappedData.SemiProbabilisticOutput, children[2]);
Assert.IsInstanceOf(children[3]);
}
Fisheye: Tag 746902d8ff996441c8d885dbea8bc605fcee8239 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingOutputTreeNodeInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingSemiProbabilisticOutputTreeNodeInfoTest.cs
===================================================================
diff -u
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingSemiProbabilisticOutputTreeNodeInfoTest.cs (revision 0)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingSemiProbabilisticOutputTreeNodeInfoTest.cs (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -0,0 +1,110 @@
+using System.Linq;
+using Core.Common.Controls.TreeView;
+using Core.Common.Gui;
+using Core.Common.Gui.ContextMenu;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Piping.Data;
+using Ringtoets.Piping.Forms.Properties;
+using Ringtoets.Piping.Plugin;
+
+namespace Ringtoets.Piping.Forms.Test.TreeNodeInfos
+{
+ [TestFixture]
+ public class PipingSemiProbabilisticOutputTreeNodeInfoTest
+ {
+ private MockRepository mocks;
+ private PipingGuiPlugin plugin;
+ private TreeNodeInfo info;
+
+ [SetUp]
+ public void SetUp()
+ {
+ mocks = new MockRepository();
+ plugin = new PipingGuiPlugin();
+ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(PipingSemiProbabilisticOutput));
+ }
+
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Assert
+ Assert.AreEqual(typeof(PipingSemiProbabilisticOutput), info.TagType);
+ Assert.IsNull(info.ForeColor);
+ Assert.IsNull(info.EnsureVisibleOnCreate);
+ Assert.IsNull(info.ChildNodeObjects);
+ Assert.IsNull(info.CanRename);
+ Assert.IsNull(info.OnNodeRenamed);
+ Assert.IsNull(info.CanRemove);
+ Assert.IsNull(info.OnNodeRemoved);
+ Assert.IsNull(info.CanCheck);
+ Assert.IsNull(info.IsChecked);
+ Assert.IsNull(info.OnNodeChecked);
+ Assert.IsNull(info.CanDrag);
+ Assert.IsNull(info.CanDrop);
+ Assert.IsNull(info.CanInsert);
+ Assert.IsNull(info.OnDrop);
+ }
+
+ [Test]
+ public void Text_Always_ReturnsTextFromResource()
+ {
+ // Setup
+ var pipingOutput = mocks.StrictMock(0, 0, 0, 0);
+
+ mocks.ReplayAll();
+
+ // Call
+ var text = info.Text(pipingOutput);
+
+ // Assert
+ Assert.AreEqual(Resources.PipingOutput_DisplayName, text);
+
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void Image_Always_ReturnsSetImage()
+ {
+ // Setup
+ var pipingOutput = mocks.StrictMock(0, 0, 0, 0);
+
+ mocks.ReplayAll();
+
+ // Call
+ var image = info.Image(pipingOutput);
+
+ // Assert
+ TestHelper.AssertImagesAreEqual(Resources.PipingOutputIcon, image);
+
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void ContextMenuStrip_Always_CallsBuilder()
+ {
+ // Setup
+ var gui = mocks.StrictMultiMock();
+ var treeViewControl = mocks.StrictMock();
+ var menuBuilderMock = mocks.StrictMock();
+
+ gui.Expect(g => g.Get(null, treeViewControl)).Return(menuBuilderMock);
+
+ menuBuilderMock.Expect(mb => mb.AddExportItem()).Return(menuBuilderMock);
+ menuBuilderMock.Expect(mb => mb.AddSeparator()).Return(menuBuilderMock);
+ menuBuilderMock.Expect(mb => mb.AddPropertiesItem()).Return(menuBuilderMock);
+ menuBuilderMock.Expect(mb => mb.Build()).Return(null);
+
+ mocks.ReplayAll();
+
+ plugin.Gui = gui;
+
+ // Call
+ info.ContextMenuStrip(null, null, treeViewControl);
+
+ // Assert
+ mocks.VerifyAll();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs
===================================================================
diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -93,8 +93,8 @@
Assert.IsNull(pipingInputContextProperties.GetObjectPropertiesData);
Assert.IsNull(pipingInputContextProperties.AfterCreate);
- var pipingOutputProperties = propertyInfos.Single(pi => pi.DataType == typeof(PipingOutput));
- Assert.AreEqual(typeof(PipingOutputProperties), pipingOutputProperties.PropertyObjectType);
+ var pipingOutputProperties = propertyInfos.Single(pi => pi.DataType == typeof(PipingSemiProbabilisticOutput));
+ Assert.AreEqual(typeof(PipingSemiProbabilisticOutputProperties), pipingOutputProperties.PropertyObjectType);
Assert.IsNull(pipingOutputProperties.AdditionalDataCheck);
Assert.IsNull(pipingOutputProperties.GetObjectPropertiesData);
Assert.IsNull(pipingOutputProperties.AfterCreate);
@@ -147,7 +147,7 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(PipingCalculationGroupContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(PipingInputContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(PipingFailureMechanismContext)));
- Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(PipingOutput)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(PipingSemiProbabilisticOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyPipingOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyPipingCalculationReport)));
}
Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingSemiProbabilisticCalculationServiceTest.cs
===================================================================
diff -u -rde18e9d8a0324e9345f412eb6c1ffeed4f86f2fb -r746902d8ff996441c8d885dbea8bc605fcee8239
--- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingSemiProbabilisticCalculationServiceTest.cs (.../PipingSemiProbabilisticCalculationServiceTest.cs) (revision de18e9d8a0324e9345f412eb6c1ffeed4f86f2fb)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingSemiProbabilisticCalculationServiceTest.cs (.../PipingSemiProbabilisticCalculationServiceTest.cs) (revision 746902d8ff996441c8d885dbea8bc605fcee8239)
@@ -17,7 +17,7 @@
{
// Setup
var calculatorResult = new PipingOutput(double.NaN, factorOfSafety, double.NaN, double.NaN, double.NaN, double.NaN);
- var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.SellmeijerFactorOfSafety, calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
+ var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, calculatorResult.SellmeijerFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
// Call
double result = transformer.FailureProbabilityUplift();
@@ -35,7 +35,7 @@
{
// Setup
var calculatorResult = new PipingOutput(double.NaN, double.NaN, double.NaN, factorOfSafety, double.NaN, double.NaN);
- var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.SellmeijerFactorOfSafety, calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
+ var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, calculatorResult.SellmeijerFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
// Call
double result = transformer.FailureProbabilityHeave();
@@ -53,7 +53,7 @@
{
// Setup
var calculatorResult = new PipingOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN, factorOfSafety);
- var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.SellmeijerFactorOfSafety, calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
+ var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, calculatorResult.SellmeijerFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
// Call
double result = transformer.FailureProbabilitySellmeijer();
@@ -73,7 +73,7 @@
{
// Setup
var calculatorResult = new PipingOutput(double.NaN, fosUplift, double.NaN, fosHeave, double.NaN, fosSellmeijer);
- var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.SellmeijerFactorOfSafety, calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
+ var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, calculatorResult.SellmeijerFactorOfSafety, norm, double.NaN, double.NaN, double.NaN, double.NaN);
// Call
double result = transformer.BetaCrossPiping();
@@ -92,7 +92,7 @@
{
// Setup
var calculatorResult = new PipingOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN, double.NaN);
- var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.SellmeijerFactorOfSafety, calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, norm, a, b, assessmentSectionLength, contribution);
+ var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, calculatorResult.SellmeijerFactorOfSafety, norm, a, b, assessmentSectionLength, contribution);
// Call
double result = transformer.BetaCrossAllowed();
@@ -116,7 +116,7 @@
double expectedResult = 1.134713444;
var calculatorResult = new PipingOutput(double.NaN, fosUplift, double.NaN, fosHeave, double.NaN, fosSellmeijer);
- var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.SellmeijerFactorOfSafety, calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, norm, a, b, assessmentSectionLength, contribution);
+ var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, calculatorResult.SellmeijerFactorOfSafety, norm, a, b, assessmentSectionLength, contribution);
// Call
double result = transformer.FactorOfSafety();
@@ -139,7 +139,7 @@
{
// Setup
var calculatorResult = new PipingOutput(double.NaN, fosUplift, double.NaN, fosHeave, double.NaN, fosSellmeijer);
- var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.SellmeijerFactorOfSafety, calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, norm, a, b, assessmentSectionLength, contribution);
+ var transformer = new PipingSemiProbabilisticCalculationService(calculatorResult.UpliftFactorOfSafety, calculatorResult.HeaveFactorOfSafety, calculatorResult.SellmeijerFactorOfSafety, norm, a, b, assessmentSectionLength, contribution);
var betaAllowed = transformer.BetaCrossAllowed();
var betaPiping = transformer.BetaCrossPiping();