Index: src/Plugins/Wti/Wti.Data/PipingData.cs =================================================================== diff -u -r197fbe469c4b157c584994358432370a45110bff -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- src/Plugins/Wti/Wti.Data/PipingData.cs (.../PipingData.cs) (revision 197fbe469c4b157c584994358432370a45110bff) +++ src/Plugins/Wti/Wti.Data/PipingData.cs (.../PipingData.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -154,6 +154,11 @@ public double ExitPointXCoordinate { get; set; } /// + /// Gets or sets the surface line. + /// + public PipingSurfaceLine SurfaceLine { get; set; } + + /// /// Gets or sets , which contains the results of a Piping calculation. /// public PipingOutput Output { get; set; } Index: src/Plugins/Wti/Wti.Forms/NodePresenters/PipingCalculationInputsNodePresenter.cs =================================================================== diff -u --- src/Plugins/Wti/Wti.Forms/NodePresenters/PipingCalculationInputsNodePresenter.cs (revision 0) +++ src/Plugins/Wti/Wti.Forms/NodePresenters/PipingCalculationInputsNodePresenter.cs (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -0,0 +1,116 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using DelftTools.Controls; +using DelftTools.Utils.Collections; +using Wti.Data; +using Wti.Forms.PresentationObjects; +using Wti.Forms.Properties; +using Wti.Service; + +namespace Wti.Forms.NodePresenters +{ + /// + /// This class presents the data on as a node in a and + /// implements the way the user can interact with the node. + /// + public class PipingCalculationInputsNodePresenter : ITreeNodePresenter + { + public ITreeView TreeView { get; set; } + + public Type NodeTagType + { + get + { + return typeof(PipingCalculationInputs); + } + } + + public void UpdateNode(ITreeNode parentNode, ITreeNode node, object nodeData) + { + node.Text = Resources.PipingDataDisplayName; + node.Image = Resources.PipingIcon; + } + + public IEnumerable GetChildNodeObjects(object parentNodeData, ITreeNode node) + { + var pipingData = ((PipingCalculationInputs) parentNodeData).PipingData.Output; + if (pipingData != null) + { + yield return pipingData; + } + } + + public bool CanRenameNode(ITreeNode node) + { + return false; + } + + public bool CanRenameNodeTo(ITreeNode node, string newName) + { + return false; + } + + public void OnNodeRenamed(object nodeData, string newName) + { + throw new InvalidOperationException(string.Format("Cannot rename tree node of type {0}.", GetType().Name)); + } + + public void OnNodeChecked(ITreeNode node) {} + + public DragOperations CanDrag(object nodeData) + { + return DragOperations.None; + } + + public DragOperations CanDrop(object item, ITreeNode sourceNode, ITreeNode targetNode, DragOperations validOperations) + { + return DragOperations.None; + } + + public bool CanInsert(object item, ITreeNode sourceNode, ITreeNode targetNode) + { + return false; + } + + public void OnDragDrop(object item, object sourceParentNodeData, object targetParentNodeData, DragOperations operation, int position) {} + + public void OnNodeSelected(object nodeData) {} + + public ContextMenuStrip GetContextMenu(ITreeNode sender, object nodeData) + { + var contextMenu = new PipingContextMenuStrip((PipingData) nodeData); + + contextMenu.OnCalculationClick += PerformPipingCalculation; + contextMenu.OnValidationClick += PerformPipingValidation; + + return contextMenu; + } + + public void OnPropertyChanged(object sender, ITreeNode node, PropertyChangedEventArgs e) {} + + public void OnCollectionChanged(object sender, NotifyCollectionChangingEventArgs e) {} + + public bool CanRemove(object parentNodeData, object nodeData) + { + return false; + } + + public bool RemoveNodeData(object parentNodeData, object nodeData) + { + throw new InvalidOperationException(String.Format("Cannot delete node of type {0}.", GetType().Name)); + } + + private void PerformPipingValidation(PipingData pipingData) + { + PipingCalculationService.Validate(pipingData); + } + + private void PerformPipingCalculation(PipingData pipingData) + { + PipingCalculationService.PerfromValidatedCalculation(pipingData); + pipingData.NotifyObservers(); + } + } +} \ No newline at end of file Index: src/Plugins/Wti/Wti.Forms/NodePresenters/PipingContextMenuStrip.cs =================================================================== diff -u -r49b7320ad56bfa60788e8792b79dd537318f68ff -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- src/Plugins/Wti/Wti.Forms/NodePresenters/PipingContextMenuStrip.cs (.../PipingContextMenuStrip.cs) (revision 49b7320ad56bfa60788e8792b79dd537318f68ff) +++ src/Plugins/Wti/Wti.Forms/NodePresenters/PipingContextMenuStrip.cs (.../PipingContextMenuStrip.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -6,7 +6,7 @@ namespace Wti.Forms.NodePresenters { /// - /// Class for creating a for a . + /// Class for creating a for a . /// internal sealed class PipingContextMenuStrip : ContextMenuStrip { Fisheye: Tag f65154bc499025f9f5b37b9de0ebdf8026336020 refers to a dead (removed) revision in file `src/Plugins/Wti/Wti.Forms/NodePresenters/PipingDataNodePresenter.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: src/Plugins/Wti/Wti.Forms/NodePresenters/PipingFailureMechanismNodePresenter.cs =================================================================== diff -u -rfa9b36343401d44cb6813d7871903782d0dedec9 -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- src/Plugins/Wti/Wti.Forms/NodePresenters/PipingFailureMechanismNodePresenter.cs (.../PipingFailureMechanismNodePresenter.cs) (revision fa9b36343401d44cb6813d7871903782d0dedec9) +++ src/Plugins/Wti/Wti.Forms/NodePresenters/PipingFailureMechanismNodePresenter.cs (.../PipingFailureMechanismNodePresenter.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -5,6 +5,7 @@ using DelftTools.Controls; using DelftTools.Utils.Collections; using Wti.Data; +using Wti.Forms.PresentationObjects; using Wti.Forms.Properties; namespace Wti.Forms.NodePresenters @@ -35,7 +36,11 @@ if (failureMechanism.PipingData != null) { - yield return failureMechanism.PipingData; + yield return new PipingCalculationInputs + { + PipingData = failureMechanism.PipingData, + AvailablePipingSurfaceLines = failureMechanism.SurfaceLines + }; } } Index: src/Plugins/Wti/Wti.Forms/PresentationObjects/PipingCalculationInputs.cs =================================================================== diff -u --- src/Plugins/Wti/Wti.Forms/PresentationObjects/PipingCalculationInputs.cs (revision 0) +++ src/Plugins/Wti/Wti.Forms/PresentationObjects/PipingCalculationInputs.cs (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using System.Linq; + +using Wti.Data; + +namespace Wti.Forms.PresentationObjects +{ + /// + /// Presentation object for all data required to configure an instance of + /// in order to prepare it for performing a calculation. + /// + public class PipingCalculationInputs + { + /// + /// Initializes a new instance of the class. + /// + public PipingCalculationInputs() + { + AvailablePipingSurfaceLines = Enumerable.Empty(); + } + + /// + /// Gets or sets the piping data to be configured. + /// + public PipingData PipingData { get; set; } + + /// + /// Gets or sets the available piping surface lines in order for the user to select + /// one to set . + /// + public IEnumerable AvailablePipingSurfaceLines { get; set; } + } +} \ No newline at end of file Index: src/Plugins/Wti/Wti.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -rdd0526758fbd88f786a78a847b84a58faf464c1b -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- src/Plugins/Wti/Wti.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision dd0526758fbd88f786a78a847b84a58faf464c1b) +++ src/Plugins/Wti/Wti.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -459,6 +459,24 @@ } /// + /// Looks up a localized string similar to De dwarsdoorsnede die voor de piping berekening gebruikt wordt.. + /// + public static string PipingDataSurfaceLineDescription { + get { + return ResourceManager.GetString("PipingDataSurfaceLineDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Drawsdoorsnede. + /// + public static string PipingDataSurfaceLineDisplayName { + get { + return ResourceManager.GetString("PipingDataSurfaceLineDisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to De dikte van de eerste of bovenste voor doorlatendheid te onderscheiden zandlaag van mogelijk meerdere zandlagen vanaf de cohesieve grondlaag.. /// public static string PipingDataThicknessAquiferLayerDescription { Index: src/Plugins/Wti/Wti.Forms/Properties/Resources.resx =================================================================== diff -u -rdd0526758fbd88f786a78a847b84a58faf464c1b -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- src/Plugins/Wti/Wti.Forms/Properties/Resources.resx (.../Resources.resx) (revision dd0526758fbd88f786a78a847b84a58faf464c1b) +++ src/Plugins/Wti/Wti.Forms/Properties/Resources.resx (.../Resources.resx) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -379,4 +379,10 @@ Dwarsdoorsnede + + De dwarsdoorsnede die voor de piping berekening gebruikt wordt. + + + Drawsdoorsnede + \ No newline at end of file Index: src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingCalculationInputsProperties.cs =================================================================== diff -u --- src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingCalculationInputsProperties.cs (revision 0) +++ src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingCalculationInputsProperties.cs (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -0,0 +1,360 @@ +using DelftTools.Shell.Gui; +using DelftTools.Utils; + +using Wti.Data; +using Wti.Forms.PresentationObjects; +using Wti.Forms.Properties; + +namespace Wti.Forms.PropertyClasses +{ + [ResourcesDisplayName(typeof(Resources), "PipingDataPropertiesDisplayName")] + public class PipingCalculationInputsProperties : ObjectProperties + { + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataWaterVolumetricWeightDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataWaterVolumetricWeightDescription")] + public double WaterVolumetricWeight + { + get + { + return data.PipingData.WaterVolumetricWeight; + } + set + { + data.PipingData.WaterVolumetricWeight = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataUpliftModelFactorDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataUpliftModelFactorDescription")] + public double UpliftModelFactor + { + get + { + return data.PipingData.UpliftModelFactor; + } + set + { + data.PipingData.UpliftModelFactor = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataAssessmentLevelDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataAssessmentLevelDescription")] + public double AssessmentLevel + { + get + { + return data.PipingData.AssessmentLevel; + } + set + { + data.PipingData.AssessmentLevel = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataPiezometricHeadExitDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataPiezometricHeadExitDescription")] + public double PiezometricHeadExit + { + get + { + return data.PipingData.PiezometricHeadExit; + } + set + { + data.PipingData.PiezometricHeadExit = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataDampingFactorExitDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataDampingFactorExitDescription")] + public double DampingFactorExit + { + get + { + return data.PipingData.DampingFactorExit; + } + set + { + data.PipingData.DampingFactorExit = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataPhreaticLevelExitDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataPhreaticLevelExitDescription")] + public double PhreaticLevelExit + { + get + { + return data.PipingData.PhreaticLevelExit; + } + set + { + data.PipingData.PhreaticLevelExit = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataPiezometricHeadPolderDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataPiezometricHeadPolderDescription")] + public double PiezometricHeadPolder + { + get + { + return data.PipingData.PiezometricHeadPolder; + } + set + { + data.PipingData.PiezometricHeadPolder = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataCriticalHeaveGradientDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataCriticalHeaveGradientDescription")] + public double CriticalHeaveGradient + { + get + { + return data.PipingData.CriticalHeaveGradient; + } + set + { + data.PipingData.CriticalHeaveGradient = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataThicknessCoverageLayerDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataThicknessCoverageLayerDescription")] + public double ThicknessCoverageLayer + { + get + { + return data.PipingData.ThicknessCoverageLayer; + } + set + { + data.PipingData.ThicknessCoverageLayer = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataSellmeijerModelFactorDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataSellmeijerModelFactorDescription")] + public double SellmeijerModelFactor + { + get + { + return data.PipingData.SellmeijerModelFactor; + } + set + { + data.PipingData.SellmeijerModelFactor = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataSellmeijerReductionFactorDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataSellmeijerReductionFactorDescription")] + public double SellmeijerReductionFactor + { + get + { + return data.PipingData.SellmeijerReductionFactor; + } + set + { + data.PipingData.SellmeijerReductionFactor = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataSeepageLengthDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataSeepageLengthDescription")] + public double SeepageLength + { + get + { + return data.PipingData.SeepageLength; + } + set + { + data.PipingData.SeepageLength = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataSandParticlesVolumicWeightDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataSandParticlesVolumicWeightDescription")] + public double SandParticlesVolumicWeight + { + get + { + return data.PipingData.SandParticlesVolumicWeight; + } + set + { + data.PipingData.SandParticlesVolumicWeight = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataWhitesDragCoefficientDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataWhitesDragCoefficientDescription")] + public double WhitesDragCoefficient + { + get + { + return data.PipingData.WhitesDragCoefficient; + } + set + { + data.PipingData.WhitesDragCoefficient = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataDiameter70DisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataDiameter70Description")] + public double Diameter70 + { + get + { + return data.PipingData.Diameter70; + } + set + { + data.PipingData.Diameter70 = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataDarcyPermeabilityDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataDarcyPermeabilityDescription")] + public double DarcyPermeability + { + get + { + return data.PipingData.DarcyPermeability; + } + set + { + data.PipingData.DarcyPermeability = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataWaterKinematicViscosityDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataWaterKinematicViscosityDescription")] + public double WaterKinematicViscosity + { + get + { + return data.PipingData.WaterKinematicViscosity; + } + set + { + data.PipingData.WaterKinematicViscosity = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataGravityDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataGravityDescription")] + public double Gravity + { + get + { + return data.PipingData.Gravity; + } + set + { + data.PipingData.Gravity = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataThicknessAquiferLayerDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataThicknessAquiferLayerDescription")] + public double ThicknessAquiferLayer + { + get + { + return data.PipingData.ThicknessAquiferLayer; + } + set + { + data.PipingData.ThicknessAquiferLayer = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataMeanDiameter70DisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataMeanDiameter70Description")] + public double MeanDiameter70 + { + get + { + return data.PipingData.MeanDiameter70; + } + set + { + data.PipingData.MeanDiameter70 = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataBeddingAngleDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataBeddingAngleDescription")] + public double BeddingAngle + { + get + { + return data.PipingData.BeddingAngle; + } + set + { + data.PipingData.BeddingAngle = value; + data.PipingData.NotifyObservers(); + } + } + + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "PipingDataSurfaceLineDisplayName")] + [ResourcesDescription(typeof(Resources), "PipingDataSurfaceLineDescription")] + public PipingSurfaceLine SurfaceLine + { + get + { + return data.PipingData.SurfaceLine; + } + } + } +} \ No newline at end of file Fisheye: Tag f65154bc499025f9f5b37b9de0ebdf8026336020 refers to a dead (removed) revision in file `src/Plugins/Wti/Wti.Forms/PropertyClasses/PipingDataProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: src/Plugins/Wti/Wti.Forms/Wti.Forms.csproj =================================================================== diff -u -rdd0526758fbd88f786a78a847b84a58faf464c1b -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- src/Plugins/Wti/Wti.Forms/Wti.Forms.csproj (.../Wti.Forms.csproj) (revision dd0526758fbd88f786a78a847b84a58faf464c1b) +++ src/Plugins/Wti/Wti.Forms/Wti.Forms.csproj (.../Wti.Forms.csproj) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -57,18 +57,19 @@ - + + True True Resources.resx - + Index: src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs =================================================================== diff -u -rdd0526758fbd88f786a78a847b84a58faf464c1b -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs (.../WtiGuiPlugin.cs) (revision dd0526758fbd88f786a78a847b84a58faf464c1b) +++ src/Plugins/Wti/Wti.Plugin/WtiGuiPlugin.cs (.../WtiGuiPlugin.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -6,6 +6,7 @@ using Mono.Addins; using Wti.Data; using Wti.Forms.NodePresenters; +using Wti.Forms.PresentationObjects; using Wti.Forms.PropertyClasses; namespace Wti.Plugin @@ -61,7 +62,7 @@ }; yield return new PropertyInfo { - ObjectType = typeof(PipingData), PropertyType = typeof(PipingDataProperties) + ObjectType = typeof(PipingCalculationInputs), PropertyType = typeof(PipingCalculationInputsProperties) }; yield return new PropertyInfo { @@ -76,7 +77,7 @@ public override IEnumerable GetProjectTreeViewNodePresenters() { yield return new WtiProjectNodePresenter(); - yield return new PipingDataNodePresenter(); + yield return new PipingCalculationInputsNodePresenter(); yield return new PipingFailureMechanismNodePresenter(); yield return new PipingSurfaceLineCollectionNodePresenter { Index: test/Plugins/Wti/Wti.Data.Test/PipingDataTest.cs =================================================================== diff -u -r2d05e18d1fcde2d8d00d2434a6e560d65337d2f7 -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- test/Plugins/Wti/Wti.Data.Test/PipingDataTest.cs (.../PipingDataTest.cs) (revision 2d05e18d1fcde2d8d00d2434a6e560d65337d2f7) +++ test/Plugins/Wti/Wti.Data.Test/PipingDataTest.cs (.../PipingDataTest.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -33,6 +33,7 @@ Assert.AreEqual(0, defaultConstructed.Diameter70); Assert.AreEqual(0, defaultConstructed.ThicknessAquiferLayer); Assert.AreEqual(0, defaultConstructed.DarcyPermeability); + Assert.IsNull(defaultConstructed.SurfaceLine); Assert.AreEqual(1.0, defaultConstructed.DampingFactorExit); Assert.AreEqual(0.3, defaultConstructed.SellmeijerReductionFactor); Index: test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingCalculationInputsNodePresenterTest.cs =================================================================== diff -u --- test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingCalculationInputsNodePresenterTest.cs (revision 0) +++ test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingCalculationInputsNodePresenterTest.cs (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -0,0 +1,487 @@ +using System; +using System.ComponentModel; +using DelftTools.Controls; +using DelftTools.Shell.Core; +using DelftTools.TestUtils; +using DelftTools.Utils.Collections; +using NUnit.Framework; +using Rhino.Mocks; +using Wti.Calculation.Test.Piping.Stub; +using Wti.Data; +using Wti.Forms.NodePresenters; +using Wti.Forms.PresentationObjects; + +using WtiFormsResources = Wti.Forms.Properties.Resources; + +namespace Wti.Forms.Test.NodePresenters +{ + [TestFixture] + public class PipingCalculationInputsNodePresenterTest + { + private MockRepository mockRepository; + + [SetUp] + public void SetUp() + { + mockRepository = new MockRepository(); + } + + [Test] + public void DefaultConstructor_ExpectedValues() + { + // Call + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Assert + Assert.IsInstanceOf(nodePresenter); + Assert.IsNull(nodePresenter.TreeView); + Assert.AreEqual(typeof(PipingCalculationInputs), nodePresenter.NodeTagType); + } + + [Test] + public void UpdateNode_WithData_InitializeNode() + { + // Setup + const string nodeName = "Piping"; + + var mocks = new MockRepository(); + var pipingNode = mocks.Stub(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + var pipingData = new PipingData + { + AssessmentLevel = 2.0 + }; + + // Call + nodePresenter.UpdateNode(null, pipingNode, pipingData); + + // Assert + Assert.AreEqual(nodeName, pipingNode.Text); + Assert.AreEqual(16, pipingNode.Image.Height); + Assert.AreEqual(16, pipingNode.Image.Width); + } + + [Test] + public void GetChildNodeObjects_WithOutputData_ReturnOutputChildNode() + { + // Setup + var mocks = new MockRepository(); + var nodeMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + var pipingCalculationInputs = new PipingCalculationInputs + { + PipingData = new PipingData + { + Output = new PipingOutput(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) + } + }; + + // Call + var children = nodePresenter.GetChildNodeObjects(pipingCalculationInputs, nodeMock); + + // Assert + Assert.AreEqual(1, children.Count()); + CollectionAssert.AllItemsAreInstancesOfType(children, typeof(PipingOutput)); + mocks.VerifyAll(); // Expect no calls on tree node + } + + [Test] + public void GetChildNodeObjects_WithoutOutput_ReturnNoChildNodes() + { + // Setup + var mocks = new MockRepository(); + var nodeMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + var pipingCalculationInputs = new PipingCalculationInputs + { + PipingData = new PipingData() + }; + + // Call + var children = nodePresenter.GetChildNodeObjects(pipingCalculationInputs, nodeMock); + + // Assert + Assert.AreEqual(0, children.Count()); + mocks.VerifyAll(); // Expect no calls on tree node + } + + [Test] + public void CanRenameNode_Always_ReturnFalse() + { + // Setup + var mocks = new MockRepository(); + var nodeMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + var renameAllowed = nodePresenter.CanRenameNode(nodeMock); + + // Assert + Assert.IsFalse(renameAllowed); + mocks.VerifyAll(); // Expect no calls on tree node + } + + [Test] + public void CanRenameNodeTo_Always_ReturnFalse() + { + // Setup + var mocks = new MockRepository(); + var nodeMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + var renameAllowed = nodePresenter.CanRenameNodeTo(nodeMock, ""); + + // Assert + Assert.IsFalse(renameAllowed); + mocks.ReplayAll(); // Expect no calls on tree node + } + + + [Test] + public void OnNodeRenamed_Always_ThrowInvalidOperationException() + { + // Setup + var mocks = new MockRepository(); + var nodeMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + TestDelegate call = () => { nodePresenter.OnNodeRenamed(nodeMock, ""); }; + + // Assert + var exception = Assert.Throws(call); + var expectedMessage = string.Format("Cannot rename tree node of type {0}.", nodePresenter.GetType().Name); + Assert.AreEqual(expectedMessage, exception.Message); + mocks.ReplayAll(); // Expect no calls on tree node + } + + [Test] + public void OnNodeChecked_Always_DoNothing() + { + // Setup + var mocks = new MockRepository(); + var nodeMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + nodePresenter.OnNodeChecked(nodeMock); + + // Assert + mocks.VerifyAll(); // Expect no calls on tree node + } + + [Test] + public void CanDrag_Always_ReturnNone() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + DragOperations dragAllowed = nodePresenter.CanDrag(dataMock); + + // Assert + Assert.AreEqual(DragOperations.None, dragAllowed); + mocks.VerifyAll(); + } + + [Test] + public void CanDrop_Always_ReturnNone() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + var sourceMock = mocks.StrictMock(); + var targetMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + DragOperations dropAllowed = nodePresenter.CanDrop(dataMock, sourceMock, targetMock, DragOperations.Move); + + // Assert + Assert.AreEqual(DragOperations.None, dropAllowed); + mocks.VerifyAll(); // Expect no calls on mocks. + } + + [Test] + public void CanInsert_Always_ReturnFalse() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + var sourceMock = mocks.StrictMock(); + var targetMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + bool insertionAllowed = nodePresenter.CanInsert(dataMock, sourceMock, targetMock); + + // Assert + Assert.IsFalse(insertionAllowed); + mocks.VerifyAll(); // Expect no calls on arguments + } + + [Test] + public void OnDragDrop_Always_DoNothing() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + var sourceParentNodeMock = mocks.StrictMock(); + var targetParentNodeDataMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + nodePresenter.OnDragDrop(dataMock, sourceParentNodeMock, targetParentNodeDataMock, DragOperations.Move, 2); + + // Assert + mocks.VerifyAll(); // Expect no calls on arguments + } + + [Test] + public void OnNodeSelected_Always_DoNothing() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + nodePresenter.OnNodeSelected(dataMock); + + // Assert + mocks.VerifyAll(); // Expect no calls on arguments + } + + [Test] + public void GetContextMenu_Always_ContextMenuWithOneItemForCalculate() + { + // Setup + var mocks = new MockRepository(); + var nodeMock = mocks.StrictMock(); + var dataMock = mocks.StrictMock(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + mocks.ReplayAll(); + + // Call + var contextMenu = nodePresenter.GetContextMenu(nodeMock, dataMock); + + // Assert + Assert.IsNotNull(contextMenu); + Assert.AreEqual(2, contextMenu.Items.Count); + Assert.AreEqual(WtiFormsResources.PipingDataContextMenuCalculate, contextMenu.Items[1].Text); + Assert.AreEqual(WtiFormsResources.PipingDataContextMenuValidate, contextMenu.Items[0].Text); + Assert.IsInstanceOf(contextMenu); + mocks.VerifyAll(); // Expect no calls on arguments + } + + [Test] + public void OnPropertyChange_Always_DoNothing() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + var nodeMock = mocks.StrictMock(); + var eventArgsMock = mocks.StrictMock(""); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + nodePresenter.OnPropertyChanged(dataMock, nodeMock, eventArgsMock); + + // Assert + mocks.VerifyAll(); // Expect no calls on arguments + } + + [Test] + public void OnCollectionChange_Always_DoNothing() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + var eventArgsMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + nodePresenter.OnCollectionChanged(dataMock, eventArgsMock); + + // Assert + mocks.VerifyAll(); // Expect no calls on arguments + } + + [Test] + public void CanRemove_Always_ReturnTrue() + { + // Setup + var mocks = new MockRepository(); + var dataMock = mocks.StrictMock(); + var nodeMock = mocks.StrictMock(); + mocks.ReplayAll(); + + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + bool removalAllowed = nodePresenter.CanRemove(dataMock, nodeMock); + + // Assert + Assert.IsFalse(removalAllowed); + mocks.VerifyAll(); // Expect no calls on arguments + } + + [Test] + public void RemoveNodeData_Always_ThrowsInvalidOperationException() + { + // Setup + var nodePresenter = new PipingCalculationInputsNodePresenter(); + + // Call + TestDelegate removeAction = () => nodePresenter.RemoveNodeData(null, null); + + // Assert + var exception = Assert.Throws(removeAction); + var expectedMessage = string.Format("Cannot delete node of type {0}.", nodePresenter.GetType().Name); + Assert.AreEqual(expectedMessage, exception.Message); + } + + [Test] + public void GivenInvalidPipingData_WhenCalculatingFromContextMenu_ThenPipingDataNotifiesObserversAndLogMessageAdded() + { + // Given + var expectedValidationMessageCount = 6; + var expectedStatusMessageCount = 2; + var expectedLogMessageCount = expectedValidationMessageCount + expectedStatusMessageCount; + + var calculateContextMenuItemIndex = 1; + var pipingData = new PipingData(); + var observer = mockRepository.StrictMock(); + var nodePresenter = new PipingCalculationInputsNodePresenter(); + observer.Expect(o => o.UpdateObserver()); + pipingData.Attach(observer); + + mockRepository.ReplayAll(); + + var contextMenuAdapter = nodePresenter.GetContextMenu(null, pipingData); + + // When + Action action = () => contextMenuAdapter.Items[calculateContextMenuItemIndex].PerformClick(); + + // Then + TestHelper.AssertLogMessagesCount(action, expectedLogMessageCount); + Assert.IsNull(pipingData.Output); + mockRepository.VerifyAll(); + } + + [Test] + public void GivenInvalidPipingData_WhenValidatingFromContextMenu_ThenLogMessageAddedAndNoNotifyObserver() + { + // Given + var expectedValidationMessageCount = 6; + var expectedStatusMessageCount = 2; + var expectedLogMessageCount = expectedValidationMessageCount + expectedStatusMessageCount; + + var validateContextMenuItemIndex = 0; + var pipingData = new PipingData(); + var observer = mockRepository.StrictMock(); + var nodePresenter = new PipingCalculationInputsNodePresenter(); + observer.Expect(o => o.UpdateObserver()).Repeat.Never(); + pipingData.Attach(observer); + + mockRepository.ReplayAll(); + + var contextMenuAdapter = nodePresenter.GetContextMenu(null, pipingData); + + // When + Action action = () => contextMenuAdapter.Items[validateContextMenuItemIndex].PerformClick(); + + // Then + TestHelper.AssertLogMessagesCount(action, expectedLogMessageCount); + mockRepository.VerifyAll(); + } + + [Test] + public void GivenValidPipingData_WhenCalculatingFromContextMenu_ThenPipingDataNotifiesObservers() + { + // Given + var expectedCalculationStatusMessageCount = 2; + var expectedValidationStatusMessageCount = 2; + var expectedLogMessageCount = expectedCalculationStatusMessageCount + expectedValidationStatusMessageCount; + + var calculateContextMenuItemIndex = 1; + var pipingData = new PipingData(); + var validPipingInput = new TestPipingInput(); + pipingData.AssessmentLevel = validPipingInput.AssessmentLevel; + pipingData.BeddingAngle = validPipingInput.BeddingAngle; + pipingData.CriticalHeaveGradient = validPipingInput.CriticalHeaveGradient; + pipingData.DampingFactorExit = validPipingInput.DampingFactorExit; + pipingData.DarcyPermeability = validPipingInput.DarcyPermeability; + pipingData.Diameter70 = validPipingInput.Diameter70; + pipingData.ExitPointXCoordinate = validPipingInput.ExitPointXCoordinate; + pipingData.Gravity = validPipingInput.Gravity; + pipingData.MeanDiameter70 = validPipingInput.MeanDiameter70; + pipingData.PhreaticLevelExit = validPipingInput.PhreaticLevelExit; + pipingData.PiezometricHeadExit = validPipingInput.PiezometricHeadExit; + pipingData.PiezometricHeadPolder = validPipingInput.PiezometricHeadPolder; + pipingData.SandParticlesVolumicWeight = validPipingInput.SandParticlesVolumicWeight; + pipingData.SeepageLength = validPipingInput.SeepageLength; + pipingData.SellmeijerModelFactor = validPipingInput.SellmeijerModelFactor; + pipingData.SellmeijerReductionFactor = validPipingInput.SellmeijerReductionFactor; + pipingData.ThicknessAquiferLayer = validPipingInput.ThicknessAquiferLayer; + pipingData.ThicknessCoverageLayer = validPipingInput.ThicknessCoverageLayer; + pipingData.UpliftModelFactor = validPipingInput.UpliftModelFactor; + pipingData.WaterVolumetricWeight = validPipingInput.WaterVolumetricWeight; + pipingData.WaterKinematicViscosity = validPipingInput.WaterKinematicViscosity; + pipingData.WhitesDragCoefficient = validPipingInput.WhitesDragCoefficient; + + var observer = mockRepository.StrictMock(); + var nodePresenter = new PipingCalculationInputsNodePresenter(); + observer.Expect(o => o.UpdateObserver()); + pipingData.Attach(observer); + + mockRepository.ReplayAll(); + + var contextMenuAdapter = nodePresenter.GetContextMenu(null, pipingData); + + // When + Action action = () => contextMenuAdapter.Items[calculateContextMenuItemIndex].PerformClick(); + + // Then + TestHelper.AssertLogMessagesCount(action, expectedLogMessageCount); + Assert.IsNotNull(pipingData.Output); + mockRepository.VerifyAll(); + } + } +} \ No newline at end of file Fisheye: Tag f65154bc499025f9f5b37b9de0ebdf8026336020 refers to a dead (removed) revision in file `test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingDataNodePresenterTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingFailureMechanismNodePresenterTest.cs =================================================================== diff -u -r4959b3b9b84eec4cb80ec43c037579d9177b3d02 -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingFailureMechanismNodePresenterTest.cs (.../PipingFailureMechanismNodePresenterTest.cs) (revision 4959b3b9b84eec4cb80ec43c037579d9177b3d02) +++ test/Plugins/Wti/Wti.Forms.Test/NodePresenters/PipingFailureMechanismNodePresenterTest.cs (.../PipingFailureMechanismNodePresenterTest.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -7,6 +7,7 @@ using Rhino.Mocks; using Wti.Data; using Wti.Forms.NodePresenters; +using Wti.Forms.PresentationObjects; namespace Wti.Forms.Test.NodePresenters { @@ -66,7 +67,9 @@ Assert.AreEqual(3, children.Length); Assert.AreSame(pipingFailureMechanism.SoilProfiles, children[0]); Assert.AreSame(pipingFailureMechanism.SurfaceLines, children[1]); - Assert.AreSame(pipingFailureMechanism.PipingData, children[2]); + var pipingCalculationInputsObject = (PipingCalculationInputs)children[2]; + Assert.AreSame(pipingFailureMechanism.PipingData, pipingCalculationInputsObject.PipingData); + Assert.AreSame(pipingFailureMechanism.SurfaceLines, pipingCalculationInputsObject.AvailablePipingSurfaceLines); mocks.VerifyAll(); // Expect no calls on tree node } Index: test/Plugins/Wti/Wti.Forms.Test/PresentationObjects/PipingCalculationInputsTest.cs =================================================================== diff -u --- test/Plugins/Wti/Wti.Forms.Test/PresentationObjects/PipingCalculationInputsTest.cs (revision 0) +++ test/Plugins/Wti/Wti.Forms.Test/PresentationObjects/PipingCalculationInputsTest.cs (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -0,0 +1,21 @@ +using NUnit.Framework; + +using Wti.Forms.PresentationObjects; + +namespace Wti.Forms.Test.PresentationObjects +{ + [TestFixture] + public class PipingCalculationInputsTest + { + [Test] + public void DefaultConstructor_ExpectedValues() + { + // Call + var presentationObject = new PipingCalculationInputs(); + + // Assert + Assert.IsNull(presentationObject.PipingData); + CollectionAssert.IsEmpty(presentationObject.AvailablePipingSurfaceLines); + } + } +} \ No newline at end of file Index: test/Plugins/Wti/Wti.Forms.Test/PropertyClasses/PipingCalculationInputsPropertiesTest.cs =================================================================== diff -u --- test/Plugins/Wti/Wti.Forms.Test/PropertyClasses/PipingCalculationInputsPropertiesTest.cs (revision 0) +++ test/Plugins/Wti/Wti.Forms.Test/PropertyClasses/PipingCalculationInputsPropertiesTest.cs (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -0,0 +1,96 @@ +using DelftTools.Shell.Core; +using DelftTools.Shell.Gui; +using NUnit.Framework; +using Rhino.Mocks; +using Wti.Data; +using Wti.Forms.PresentationObjects; +using Wti.Forms.PropertyClasses; + +namespace Wti.Forms.Test.PropertyClasses +{ + [TestFixture] + public class PipingCalculationInputsPropertiesTest + { + [Test] + public void DefaultConstructor_ExpectedValues() + { + // Call + var properties = new PipingCalculationInputsProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + } + + [Test] + public void GetProperties_WithData_ReturnExpectedValues() + { + // Setup + var surfaceLine = new PipingSurfaceLine(); + var pipingData = new PipingData + { + SurfaceLine = surfaceLine + }; + + var properties = new PipingCalculationInputsProperties + { + Data = new PipingCalculationInputs + { + PipingData = pipingData + } + }; + + // Call & Assert + Assert.AreEqual(0, properties.CriticalHeaveGradient); + Assert.AreEqual(0, properties.UpliftModelFactor); + Assert.AreEqual(0, properties.PiezometricHeadExit); + Assert.AreEqual(0, properties.PiezometricHeadPolder); + Assert.AreEqual(0, properties.ThicknessCoverageLayer); + Assert.AreEqual(0, properties.PhreaticLevelExit); + Assert.AreEqual(0, properties.AssessmentLevel); + Assert.AreEqual(0, properties.SellmeijerModelFactor); + Assert.AreEqual(0, properties.SeepageLength); + Assert.AreEqual(0, properties.Diameter70); + Assert.AreEqual(0, properties.ThicknessAquiferLayer); + Assert.AreEqual(0, properties.DarcyPermeability); + + Assert.AreEqual(1.0, properties.DampingFactorExit); + Assert.AreEqual(0.3, properties.SellmeijerReductionFactor); + Assert.AreEqual(16.5, properties.SandParticlesVolumicWeight); + Assert.AreEqual(9.81, properties.Gravity); + Assert.AreEqual(1.33e-6, properties.WaterKinematicViscosity); + Assert.AreEqual(9.81, properties.WaterVolumetricWeight); + Assert.AreEqual(0.25, properties.WhitesDragCoefficient); + Assert.AreEqual(37, properties.BeddingAngle); + Assert.AreEqual(2.08e-4, properties.MeanDiameter70); + Assert.AreSame(surfaceLine, properties.SurfaceLine); + } + + [Test] + public void SetProperties_WithData_UpdateDataAndNotifyObservers() + { + // Setup + var mocks = new MockRepository(); + var projectObserver = mocks.StrictMock(); + projectObserver.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + + var pipingData = new PipingData(); + pipingData.Attach(projectObserver); + + var properties = new PipingCalculationInputsProperties + { + Data = new PipingCalculationInputs + { + PipingData = pipingData + } + }; + + // Call & Assert + const double assessmentLevel = 0.12; + properties.AssessmentLevel = assessmentLevel; + Assert.AreEqual(assessmentLevel, pipingData.AssessmentLevel); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Fisheye: Tag f65154bc499025f9f5b37b9de0ebdf8026336020 refers to a dead (removed) revision in file `test/Plugins/Wti/Wti.Forms.Test/PropertyClasses/PipingDataPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: test/Plugins/Wti/Wti.Forms.Test/Wti.Forms.Test.csproj =================================================================== diff -u -rdd0526758fbd88f786a78a847b84a58faf464c1b -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- test/Plugins/Wti/Wti.Forms.Test/Wti.Forms.Test.csproj (.../Wti.Forms.Test.csproj) (revision dd0526758fbd88f786a78a847b84a58faf464c1b) +++ test/Plugins/Wti/Wti.Forms.Test/Wti.Forms.Test.csproj (.../Wti.Forms.Test.csproj) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -47,7 +47,7 @@ - + @@ -56,8 +56,9 @@ + - + Index: test/Plugins/Wti/Wti.Plugin.Test/WtiGuiPluginTest.cs =================================================================== diff -u -rdd0526758fbd88f786a78a847b84a58faf464c1b -rf65154bc499025f9f5b37b9de0ebdf8026336020 --- test/Plugins/Wti/Wti.Plugin.Test/WtiGuiPluginTest.cs (.../WtiGuiPluginTest.cs) (revision dd0526758fbd88f786a78a847b84a58faf464c1b) +++ test/Plugins/Wti/Wti.Plugin.Test/WtiGuiPluginTest.cs (.../WtiGuiPluginTest.cs) (revision f65154bc499025f9f5b37b9de0ebdf8026336020) @@ -10,6 +10,7 @@ using Wti.Data; using Wti.Forms.NodePresenters; +using Wti.Forms.PresentationObjects; using Wti.Forms.PropertyClasses; using GuiPluginResources = Wti.Plugin.Properties.Resources; @@ -65,8 +66,8 @@ Assert.IsNull(wtiProjectProperties.GetObjectPropertiesData); Assert.IsNull(wtiProjectProperties.AfterCreate); - var pipingDataProperties = propertyInfos.Single(pi => pi.ObjectType == typeof(PipingData)); - Assert.AreEqual(typeof(PipingDataProperties), pipingDataProperties.PropertyType); + var pipingDataProperties = propertyInfos.Single(pi => pi.ObjectType == typeof(PipingCalculationInputs)); + Assert.AreEqual(typeof(PipingCalculationInputsProperties), pipingDataProperties.PropertyType); Assert.IsNull(pipingDataProperties.AdditionalDataCheck); Assert.IsNull(pipingDataProperties.GetObjectPropertiesData); Assert.IsNull(pipingDataProperties.AfterCreate); @@ -105,7 +106,7 @@ Assert.IsTrue(nodePresenters.Any(np => np is PipingSurfaceLineCollectionNodePresenter)); Assert.IsTrue(nodePresenters.Any(np => np is PipingSurfaceLineNodePresenter)); Assert.IsTrue(nodePresenters.Any(np => np is PipingSoilProfileCollectionNodePresenter)); - Assert.IsTrue(nodePresenters.Any(np => np is PipingDataNodePresenter)); + Assert.IsTrue(nodePresenters.Any(np => np is PipingCalculationInputsNodePresenter)); Assert.IsTrue(nodePresenters.Any(np => np is PipingFailureMechanismNodePresenter)); Assert.IsTrue(nodePresenters.Any(np => np is PipingOutputNodePresenter)); }