Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -r8b60c9e846480f3ffeeb263bfea5d3367bf6bee3 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 8b60c9e846480f3ffeeb263bfea5d3367bf6bee3) @@ -119,12 +119,13 @@ mocks.ReplayAll(); var failureMechanism = new ClosingStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { Output = hasOutput ? new TestStructuresOutput() : null }; - var calculationContext = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var calculationContext = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); // Call object[] children = info.ChildNodeObjects(calculationContext).ToArray(); @@ -150,8 +151,9 @@ // Setup var failureMechanism = new ClosingStructuresFailureMechanism(); var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = mocks.StrictMock(); using (mocks.Ordered()) @@ -202,8 +204,9 @@ }; var failureMechanism = new TestClosingStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) @@ -255,9 +258,10 @@ // Setup var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new TestClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) @@ -286,6 +290,7 @@ // Setup var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -294,7 +299,7 @@ } }; var failureMechanism = new TestClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeViewControl = new TreeViewControl()) @@ -323,6 +328,7 @@ // Setup var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -331,7 +337,7 @@ } }; var failureMechanism = new TestClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); ChangeStructure(calculation.InputParameters.Structure); @@ -361,6 +367,7 @@ // Given var assessmentSection = mocks.Stub(); var structure = new TestClosingStructure(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -369,7 +376,7 @@ } }; var failureMechanism = new ClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var inputObserver = mocks.StrictMock(); inputObserver.Expect(obs => obs.UpdateObserver()); @@ -406,6 +413,7 @@ // Given var assessmentSection = mocks.Stub(); var structure = new TestClosingStructure(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -417,7 +425,7 @@ ClosingStructuresInput calculationInput = calculation.InputParameters; var failureMechanism = new ClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var inputObserver = mocks.StrictMock(); calculationInput.Attach(inputObserver); @@ -466,6 +474,7 @@ // Given var assessmentSection = mocks.Stub(); var structure = new TestClosingStructure(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -475,7 +484,7 @@ Output = new TestStructuresOutput() }; var failureMechanism = new ClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); var inputObserver = mocks.StrictMock(); inputObserver.Expect(obs => obs.UpdateObserver()); @@ -525,9 +534,10 @@ { // Setup var assessmentSection = mocks.Stub(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new TestClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -561,9 +571,10 @@ var assessmentSection = mocks.Stub(); assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new TestClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -605,9 +616,10 @@ Version = "1.0" }; + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new ClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -647,9 +659,10 @@ Version = "1.0" }; + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var failureMechanism = new TestClosingStructuresFailureMechanism(); - var nodeData = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var nodeData = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -680,9 +693,11 @@ // Setup var assessmentSection = mocks.Stub(); var failureMechanism = new TestClosingStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); var nodeData = new ClosingStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -715,10 +730,12 @@ // Setup var assessmentSection = mocks.Stub(); var failureMechanism = new TestClosingStructuresFailureMechanism(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(); var nodeData = new ClosingStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -753,11 +770,13 @@ var failureMechanism = new TestClosingStructuresFailureMechanism(); var foreshoreProfileInput = new TestForeshoreProfile(); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation(); calculation.InputParameters.ForeshoreProfile = foreshoreProfileInput; TestForeshoreProfile.ChangeBreakWaterProperties(foreshoreProfileInput); var nodeData = new ClosingStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -795,6 +814,7 @@ var failureMechanism = new TestClosingStructuresFailureMechanism(); var foreshoreProfileInput = new TestForeshoreProfile(true); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -803,6 +823,7 @@ } }; var nodeData = new ClosingStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -845,6 +866,7 @@ var failureMechanism = new TestClosingStructuresFailureMechanism(); var foreshoreProfileInput = new TestForeshoreProfile(true); + var parent = new CalculationGroup(); var calculation = new StructuresCalculation { InputParameters = @@ -855,6 +877,7 @@ }; var nodeData = new ClosingStructuresCalculationContext(calculation, + parent, failureMechanism, assessmentSection); @@ -941,6 +964,7 @@ assessmentSection.Stub(a => a.FailureMechanismContribution).Return(new FailureMechanismContribution(Enumerable.Empty(), 1)); var initialOutput = new TestStructuresOutput(); + var parent = new CalculationGroup(); var calculation = new TestClosingStructuresCalculation { Output = initialOutput, @@ -950,7 +974,7 @@ } }; - var calculationContext = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var calculationContext = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -1013,6 +1037,7 @@ } }; + var parent = new CalculationGroup(); var calculation = new TestClosingStructuresCalculation { InputParameters = @@ -1025,7 +1050,7 @@ calculation.Attach(observer); var failureMechanism = new TestClosingStructuresFailureMechanism(); - var calculationContext = new ClosingStructuresCalculationContext(calculation, failureMechanism, assessmentSection); + var calculationContext = new ClosingStructuresCalculationContext(calculation, parent, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -1060,9 +1085,11 @@ var observer = mocks.StrictMock(); var assessmentSection = mocks.Stub(); var calculationContext = new ClosingStructuresCalculationContext(elementToBeRemoved, + group, failureMechanism, assessmentSection); var groupContext = new ClosingStructuresCalculationGroupContext(group, + null, failureMechanism, assessmentSection); @@ -1095,9 +1122,11 @@ var elementToBeRemoved = new StructuresCalculation(); var assessmentSection = mocks.Stub(); var calculationContext = new ClosingStructuresCalculationContext(elementToBeRemoved, + group, failureMechanism, assessmentSection); var groupContext = new ClosingStructuresCalculationGroupContext(group, + null, failureMechanism, assessmentSection);