Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r4bf59bb3506b840b284efe0c0f4431b7876e0e5b -re46bec50706f5ea1a7754bbaebfc892745d8604a --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 4bf59bb3506b840b284efe0c0f4431b7876e0e5b) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision e46bec50706f5ea1a7754bbaebfc892745d8604a) @@ -284,7 +284,11 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new HeightStructuresFailureMechanism(); - failureMechanism.HeightStructures.Add(new TestHeightStructure()); + failureMechanism.HeightStructuresCollection.AddRange(new[] + { + new TestHeightStructure() + }, "some path"); + var assessmentSection = mocks.Stub(); assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); var groupContext = new HeightStructuresCalculationGroupContext(group, @@ -1039,18 +1043,12 @@ { var assessmentSection = mocks.Stub(); - HeightStructure structure1 = new TestHeightStructure("Structure 1"); - HeightStructure structure2 = new TestHeightStructure("Structure 2"); + HeightStructure structure1 = new TestHeightStructure("Structure 1", "Structure Id"); var existingCalculationGroup = new CalculationGroup(); var existingCalculation = new StructuresCalculation(); var failureMechanism = new HeightStructuresFailureMechanism { - HeightStructures = - { - structure1, - structure2 - }, CalculationsGroup = { Children = @@ -1060,6 +1058,11 @@ } } }; + failureMechanism.HeightStructuresCollection.AddRange(new[] + { + structure1, + new TestHeightStructure() + }, "some path"); var nodeData = new HeightStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism, @@ -1109,18 +1112,15 @@ using (var treeViewControl = new TreeViewControl()) { var assessmentSection = mocks.Stub(); + var failureMechanism = new HeightStructuresFailureMechanism(); - HeightStructure structure1 = new TestHeightStructure("Structure 1"); - HeightStructure structure2 = new TestHeightStructure("Structure 2"); - - var failureMechanism = new HeightStructuresFailureMechanism - { - HeightStructures = + failureMechanism.HeightStructuresCollection.AddRange( + new[] { - structure1, - structure2 - } - }; + new TestHeightStructure("Structure 1", "1"), + new TestHeightStructure("Structure 2", "2") + }, "some path" + ); var nodeData = new HeightStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism, @@ -1167,14 +1167,10 @@ var assessmentSection = mocks.Stub(); const string existingCalculationName = "Height structure"; - HeightStructure heightStructure = new TestHeightStructure(existingCalculationName); + HeightStructure heightStructure = new TestHeightStructure(existingCalculationName, "heightStructureId"); var failureMechanism = new HeightStructuresFailureMechanism { - HeightStructures = - { - heightStructure - }, CalculationsGroup = { Children = @@ -1186,6 +1182,11 @@ } } }; + failureMechanism.HeightStructuresCollection.AddRange(new[] + { + heightStructure, + new TestHeightStructure() + }, "some path"); var nodeData = new HeightStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism,