Index: src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs =================================================================== diff -u -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs (.../PipingDataNodeController.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) +++ src/Plugins/Wti/Wti.Controller/PipingDataNodeController.cs (.../PipingDataNodeController.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -1,9 +1,7 @@ using System; -using System.Linq.Expressions; using DelftTools.Controls; using DelftTools.Controls.Swf; using log4net; -using log4net.Core; using Wti.Calculation.Piping; using Wti.Data; using Wti.Forms.NodePresenters; @@ -68,7 +66,7 @@ var pipingCalculation = new PipingCalculation(input); var pipingResult = pipingCalculation.Calculate(); - pipingData.Output = new PipingOuput( + pipingData.Output = new PipingOutput( pipingResult.HeaveFactorOfSafety, pipingResult.HeaveZValue, pipingResult.UpliftFactorOfSafety, Index: src/Plugins/Wti/Wti.Data/PipingData.cs =================================================================== diff -u -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- src/Plugins/Wti/Wti.Data/PipingData.cs (.../PipingData.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) +++ src/Plugins/Wti/Wti.Data/PipingData.cs (.../PipingData.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -6,9 +6,9 @@ public class PipingData : IObservable { private IList observers = new List(); - private PipingOuput output; + private PipingOutput output; - public PipingOuput Output + public PipingOutput Output { get { Fisheye: Tag 24bc894728eb6ecdeb3c0cea11611222a889f126 refers to a dead (removed) revision in file `src/Plugins/Wti/Wti.Data/PipingOuput.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: src/Plugins/Wti/Wti.Data/PipingOutput.cs =================================================================== diff -u --- src/Plugins/Wti/Wti.Data/PipingOutput.cs (revision 0) +++ src/Plugins/Wti/Wti.Data/PipingOutput.cs (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -0,0 +1,24 @@ +using System; + +namespace Wti.Data +{ + public class PipingOutput + { + public double HeaveFactorOfSafety { get; private set; } + public double HeaveZValue { get; private set; } + public double UpliftFactorOfSafety { get; private set; } + public double UpliftZValue { get; private set; } + 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) + { + HeaveFactorOfSafety = heaveFactorOfSafety; + HeaveZValue = heaveZValue; + UpliftFactorOfSafety = upliftFactorOfSafety; + UpliftZValue = upliftZValue; + SellmeijerFactorOfSafety = sellmeijerFactorOfSafety; + SellmeijerZValue = sellmeijerZValue; + } + } +} \ No newline at end of file Index: src/Plugins/Wti/Wti.Data/Wti.Data.csproj =================================================================== diff -u -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- src/Plugins/Wti/Wti.Data/Wti.Data.csproj (.../Wti.Data.csproj) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) +++ src/Plugins/Wti/Wti.Data/Wti.Data.csproj (.../Wti.Data.csproj) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -71,7 +71,7 @@ - + Index: src/Plugins/Wti/Wti.Forms/NodePresenters/PipingOutputNodePresenter.cs =================================================================== diff -u -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- src/Plugins/Wti/Wti.Forms/NodePresenters/PipingOutputNodePresenter.cs (.../PipingOutputNodePresenter.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) +++ src/Plugins/Wti/Wti.Forms/NodePresenters/PipingOutputNodePresenter.cs (.../PipingOutputNodePresenter.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -16,7 +16,7 @@ { get { - return typeof(PipingOuput); + return typeof(PipingOutput); } } Index: src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingOutputProperties.cs =================================================================== diff -u -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingOutputProperties.cs (.../PipingOutputProperties.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) +++ src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingOutputProperties.cs (.../PipingOutputProperties.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -6,7 +6,7 @@ namespace Wti.Forms.PropertyClasses { [ResourcesDisplayName(typeof(Resources), "PipingOutputPropertiesDisplayName")] - public class PipingOutputProperties : ObjectProperties + public class PipingOutputProperties : ObjectProperties { [ResourcesCategory(typeof(Resources), "Categories_General")] [ResourcesDisplayName(typeof(Resources), "PipingOutputHeaveFactorOfSafetyDisplayName")] Index: src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs =================================================================== diff -u -r25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs (.../WtiGuiPlugin.cs) (revision 25ea8e7a3358ccf418ac651c2ac1dd7fc4ee8bed) +++ src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs (.../WtiGuiPlugin.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -52,7 +52,7 @@ { yield return new PropertyInfo{ ObjectType = typeof(WtiProject), PropertyType = typeof(WtiProjectProperties)}; yield return new PropertyInfo{ ObjectType = typeof(PipingData), PropertyType = typeof(PipingDataProperties)}; - yield return new PropertyInfo{ ObjectType = typeof(PipingOuput), PropertyType = typeof(PipingOutputProperties)}; + yield return new PropertyInfo{ ObjectType = typeof(PipingOutput), PropertyType = typeof(PipingOutputProperties)}; } public override IEnumerable GetProjectTreeViewNodePresenters() Index: test/Plugins/Wti/Wti.Controller.Test/PipingDataNodeControllerTest.cs =================================================================== diff -u -r2d9d348cd9b43f459552620c44bc54d13d522006 -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- test/Plugins/Wti/Wti.Controller.Test/PipingDataNodeControllerTest.cs (.../PipingDataNodeControllerTest.cs) (revision 2d9d348cd9b43f459552620c44bc54d13d522006) +++ test/Plugins/Wti/Wti.Controller.Test/PipingDataNodeControllerTest.cs (.../PipingDataNodeControllerTest.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -36,5 +36,42 @@ Assert.That(actual, Is.InstanceOf()); Assert.That(((MenuItemContextMenuStripAdapter)actual).ContextMenuStrip, Is.InstanceOf()); } + + [Test] + public void GivenPipingDataWithSomeValidInput_WhenInvokingCalculationThroughContextMenu_ThenPipingDataContainsOutput() + { + PipingData pipingData = ValidPipingData; + var pipingDataNodeController = new PipingDataNodeController(); + MenuItemContextMenuStripAdapter contextMenu = pipingDataNodeController.GetContextMenu(pipingData) as MenuItemContextMenuStripAdapter; + contextMenu.ContextMenuStrip.Items[0].PerformClick(); + var actual = pipingData.Output; + Assert.That(actual, Is.Not.Null); + } + + public PipingData ValidPipingData = new PipingData + { + AssessmentLevel = 1.0, + BeddingAngle = 1.0, + CriticalHeaveGradient = 1.0, + DampingFactorExit = 1.0, + DarcyPermeability = 1.0, + Diameter70 = 1.0, + ExitPointXCoordinate = 1.0, + Gravity = 1.0, + MeanDiameter70 = 1.0, + PiezometricHeadExit = 1.0, + PiezometricHeadPolder = 1.0, + PhreaticLevelExit = 2.0, + SandParticlesVolumicWeight = 1.0, + SeepageLength = 1.0, + SellmeijerModelFactor = 1.0, + SellmeijerReductionFactor = 1.0, + ThicknessAquiferLayer = 1.0, + ThicknessCoverageLayer = 1.0, + UpliftModelFactor = 1.0, + WaterKinematicViscosity = 1.0, + WaterVolumetricWeight = 1.0, + WhitesDragCoefficient = 1.0 + }; } } Index: test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingDataNodePresenterTest.cs =================================================================== diff -u -r91692bb0416bdff85f51b10a3c151d67721d9319 -r24bc894728eb6ecdeb3c0cea11611222a889f126 --- test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingDataNodePresenterTest.cs (.../PipingDataNodePresenterTest.cs) (revision 91692bb0416bdff85f51b10a3c151d67721d9319) +++ test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingDataNodePresenterTest.cs (.../PipingDataNodePresenterTest.cs) (revision 24bc894728eb6ecdeb3c0cea11611222a889f126) @@ -65,12 +65,13 @@ var nodePresenter = new PipingDataNodePresenter(); var project = new PipingData(); + project.Output = new PipingOutput(0.0,0.0,0.0,0.0,0.0,0.0); // call var children = nodePresenter.GetChildNodeObjects(project, nodeMock); // assert - CollectionAssert.IsEmpty(children); + CollectionAssert.AllItemsAreInstancesOfType(children, typeof(PipingOutput)); mocks.VerifyAll(); // Expect no calls on tree node }