Index: src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs
===================================================================
diff -u -r24bc894728eb6ecdeb3c0cea11611222a889f126 -r136165beb75e7d056353221b314c2a088374c32c
--- src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs (.../PipingDataNodeController.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126)
+++ src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs (.../PipingDataNodeController.cs) (revision 136165beb75e7d056353221b314c2a088374c32c)
@@ -66,14 +66,9 @@
var pipingCalculation = new PipingCalculation(input);
var pipingResult = pipingCalculation.Calculate();
- pipingData.Output = new PipingOutput(
- pipingResult.HeaveFactorOfSafety,
- pipingResult.HeaveZValue,
+ pipingData.Output = new PipingOutput(pipingResult.UpliftZValue,
pipingResult.UpliftFactorOfSafety,
- pipingResult.UpliftZValue,
- pipingResult.SellmeijerFactorOfSafety,
- pipingResult.SellmeijerZValue
- );
+ pipingResult.HeaveZValue, pipingResult.HeaveFactorOfSafety, pipingResult.SellmeijerZValue, pipingResult.SellmeijerFactorOfSafety);
}
catch (PipingCalculationException e)
{
Index: src/Plugins/Wti/Wti.Data/PipingOutput.cs
===================================================================
diff -u -r24bc894728eb6ecdeb3c0cea11611222a889f126 -r136165beb75e7d056353221b314c2a088374c32c
--- src/Plugins/Wti/Wti.Data/PipingOutput.cs (.../PipingOutput.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126)
+++ src/Plugins/Wti/Wti.Data/PipingOutput.cs (.../PipingOutput.cs) (revision 136165beb75e7d056353221b314c2a088374c32c)
@@ -11,7 +11,7 @@
public double SellmeijerFactorOfSafety { get; private set; }
public double SellmeijerZValue { get; private set; }
- public PipingOutput(double heaveFactorOfSafety, double heaveZValue, double upliftFactorOfSafety, double upliftZValue, double sellmeijerFactorOfSafety, double sellmeijerZValue)
+ public PipingOutput(double upliftZValue, double upliftFactorOfSafety, double heaveZValue, double heaveFactorOfSafety, double sellmeijerZValue, double sellmeijerFactorOfSafety)
{
HeaveFactorOfSafety = heaveFactorOfSafety;
HeaveZValue = heaveZValue;
Index: test/Plugins/Wti/Wti.Data.Test/PipingOutputTest.cs
===================================================================
diff -u
--- test/Plugins/Wti/Wti.Data.Test/PipingOutputTest.cs (revision 0)
+++ test/Plugins/Wti/Wti.Data.Test/PipingOutputTest.cs (revision 136165beb75e7d056353221b314c2a088374c32c)
@@ -0,0 +1,29 @@
+using System;
+using NUnit.Framework;
+
+namespace Wti.Data.Test
+{
+ public class PipingOutputTest
+ {
+ [Test]
+ public void GivenSomeValues_WhenConstructedWithValues_ThenPropertiesAreSet()
+ {
+ var random = new Random(22);
+ var zuValue = random.NextDouble();
+ var foSuValue = random.NextDouble();
+ var zhValue = random.NextDouble();
+ var foShValue = random.NextDouble();
+ var zsValue = random.NextDouble();
+ var foSsValue = random.NextDouble();
+
+ var actual = new PipingOutput(zuValue, foSuValue, zhValue, foShValue, zsValue, foSsValue);
+
+ Assert.That(actual.UpliftZValue, Is.EqualTo(zuValue));
+ Assert.That(actual.UpliftFactorOfSafety, Is.EqualTo(foSuValue));
+ Assert.That(actual.HeaveZValue, Is.EqualTo(zhValue));
+ Assert.That(actual.HeaveFactorOfSafety, Is.EqualTo(foShValue));
+ Assert.That(actual.SellmeijerZValue, Is.EqualTo(zsValue));
+ Assert.That(actual.SellmeijerFactorOfSafety, Is.EqualTo(foSsValue));
+ }
+ }
+}
\ No newline at end of file
Index: test/Plugins/Wti/Wti.Data.Test/Wti.Data.Test.csproj
===================================================================
diff -u -r3912a159ea7726b8b92966345440c2fff2b297e0 -r136165beb75e7d056353221b314c2a088374c32c
--- test/Plugins/Wti/Wti.Data.Test/Wti.Data.Test.csproj (.../Wti.Data.Test.csproj) (revision 3912a159ea7726b8b92966345440c2fff2b297e0)
+++ test/Plugins/Wti/Wti.Data.Test/Wti.Data.Test.csproj (.../Wti.Data.Test.csproj) (revision 136165beb75e7d056353221b314c2a088374c32c)
@@ -81,6 +81,7 @@
+
Index: test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingDataNodePresenterTest.cs
===================================================================
diff -u -r24bc894728eb6ecdeb3c0cea11611222a889f126 -r136165beb75e7d056353221b314c2a088374c32c
--- test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingDataNodePresenterTest.cs (.../PipingDataNodePresenterTest.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126)
+++ test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingDataNodePresenterTest.cs (.../PipingDataNodePresenterTest.cs) (revision 136165beb75e7d056353221b314c2a088374c32c)
@@ -65,7 +65,7 @@
var nodePresenter = new PipingDataNodePresenter();
var project = new PipingData();
- project.Output = new PipingOutput(0.0,0.0,0.0,0.0,0.0,0.0);
+ project.Output = new PipingOutput(0.0,0.0,0.0, 0.0, 0.0, 0.0);
// call
var children = nodePresenter.GetChildNodeObjects(project, nodeMock);