Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -r8b60c9e846480f3ffeeb263bfea5d3367bf6bee3 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 8b60c9e846480f3ffeeb263bfea5d3367bf6bee3) @@ -133,12 +133,13 @@ mocks.ReplayAll(); var failureMechanism = new HeightStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { Output = hasOutput ? new TestStructuresOutput() : null }; - var calculationContext = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var calculationContext = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); // Call object[] children = info.ChildNodeObjects(calculationContext).ToArray(); @@ -164,8 +165,9 @@ // Setup var failureMechanism = new HeightStructuresFailureMechanism(); var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = mocks.StrictMock(); using (mocks.Ordered()) @@ -211,8 +213,9 @@ // Setup var failureMechanism = new TestHeightStructuresFailureMechanism(); var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); string validFilePath = Path.Combine(testDataPath, "complete.sqlite"); @@ -274,9 +277,10 @@ // Setup var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new TestHeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) @@ -308,6 +312,7 @@ // Setup var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -316,7 +321,7 @@ } }; var failureMechanism = new TestHeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) @@ -348,6 +353,7 @@ // Setup var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -356,7 +362,7 @@ } }; var failureMechanism = new TestHeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); ChangeStructure(calculation.InputParameters.Structure); @@ -389,6 +395,7 @@ // Given var assessmentSection = mocks.Stub(); var structure = new TestHeightStructure(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -397,7 +404,7 @@ } }; var failureMechanism = new HeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var inputObserver = mocks.StrictMock(); inputObserver.Expect(obs => obs.UpdateObserver()); @@ -437,6 +444,7 @@ // Given var assessmentSection = mocks.Stub(); var structure = new TestHeightStructure(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -447,7 +455,7 @@ }; var failureMechanism = new HeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var inputObserver = mocks.StrictMock(); calculation.InputParameters.Attach(inputObserver); @@ -499,6 +507,7 @@ // Given var assessmentSection = mocks.Stub(); var structure = new TestHeightStructure(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -508,7 +517,7 @@ Output = new TestStructuresOutput() }; var failureMechanism = new HeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var inputObserver = mocks.StrictMock(); inputObserver.Expect(obs => obs.UpdateObserver()); @@ -562,8 +571,9 @@ // Setup var assessmentSection = mocks.Stub(); var failureMechanism = new TestHeightStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -593,8 +603,9 @@ // Setup var assessmentSection = mocks.Stub(); var failureMechanism = new TestHeightStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -636,8 +647,9 @@ Version = "1.0" }; + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -676,8 +688,9 @@ Version = "1.0" }; + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -706,8 +719,9 @@ // Setup var assessmentSection = mocks.Stub(); var failureMechanism = new TestHeightStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -739,8 +753,9 @@ assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); var failureMechanism = new TestHeightStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -778,9 +793,10 @@ Version = "1.0" }; + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new HeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -817,9 +833,10 @@ Version = "1.0" }; + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new TestHeightStructuresFailureMechanism(); - var nodeData = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -848,9 +865,11 @@ // Setup var assessmentSection = mocks.Stub(); var failureMechanism = new TestHeightStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var nodeData = new HeightStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -884,10 +903,12 @@ // Setup var assessmentSection = mocks.Stub(); var failureMechanism = new TestHeightStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(); var nodeData = new HeightStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -923,11 +944,13 @@ var failureMechanism = new TestHeightStructuresFailureMechanism(); var foreshoreProfileInput = new TestForeshoreProfile(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); calculation.InputParameters.ForeshoreProfile = foreshoreProfileInput; TestForeshoreProfile.ChangeBreakWaterProperties(foreshoreProfileInput); var nodeData = new HeightStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -966,6 +989,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); var foreshoreProfileInput = new TestForeshoreProfile(true); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -974,6 +998,7 @@ } }; var nodeData = new HeightStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -1017,6 +1042,7 @@ var failureMechanism = new TestHeightStructuresFailureMechanism(); var foreshoreProfileInput = new TestForeshoreProfile(true); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -1027,6 +1053,7 @@ }; var nodeData = new HeightStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -1113,6 +1140,7 @@ }; var initialOutput = new TestStructuresOutput(); + var parent = new CalculationGroup(); var calculation = new TestHeightStructuresCalculation { Output = initialOutput, @@ -1123,7 +1151,7 @@ }; calculation.Attach(observer); - var calculationContext = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var calculationContext = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -1188,6 +1216,7 @@ } }; + var parent = new CalculationGroup(); var calculation = new TestHeightStructuresCalculation { InputParameters = @@ -1198,7 +1227,7 @@ calculation.Attach(observer); var failureMechanism = new TestHeightStructuresFailureMechanism(); - var calculationContext = new HeightStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var calculationContext = new HeightStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -1236,9 +1265,11 @@ var observer = mocks.StrictMock(); var assessmentSection = mocks.Stub(); var calculationContext = new HeightStructuresCalculationContext(elementToBeRemoved, + group, failureMechanism, assessmentSection); var groupContext = new HeightStructuresCalculationGroupContext(group, + null, failureMechanism, assessmentSection); @@ -1271,9 +1302,11 @@ var elementToBeRemoved = new StructuresCalculation(); var assessmentSection = mocks.Stub(); var calculationContext = new HeightStructuresCalculationContext(elementToBeRemoved, + group, failureMechanism, assessmentSection); var groupContext = new HeightStructuresCalculationGroupContext(group, + null, failureMechanism, assessmentSection);