Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rb25389d952b8ac86e61c5e822124b2c250ae3e55 -r5bca160555d6a573d0defcea46dd4e60e16cc274 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision b25389d952b8ac86e61c5e822124b2c250ae3e55) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 5bca160555d6a573d0defcea46dd4e60e16cc274) @@ -1039,12 +1039,22 @@ HeightStructure structure1 = new TestHeightStructure("Structure 1"); HeightStructure structure2 = new TestHeightStructure("Structure 2"); + var existingCalculationGroup = new CalculationGroup(); + var existingCalculation = new StructuresCalculation(); var failureMechanism = new HeightStructuresFailureMechanism { HeightStructures = { structure1, structure2 + }, + CalculationsGroup = + { + Children = + { + existingCalculationGroup, + existingCalculation + } } }; @@ -1079,9 +1089,12 @@ contextMenu.Items[contextMenuGenerateCalculationsIndexRootGroup].PerformClick(); // Then - var heightStructuresCalculations = failureMechanism.Calculations.OfType>().ToArray(); - Assert.AreEqual(1, heightStructuresCalculations.Length); - Assert.AreSame(structure1, heightStructuresCalculations[0].InputParameters.Structure); + Assert.AreEqual(3, failureMechanism.CalculationsGroup.Children.Count); + Assert.AreSame(existingCalculationGroup, failureMechanism.CalculationsGroup.Children[0]); + Assert.AreSame(existingCalculation, failureMechanism.CalculationsGroup.Children[1]); + var generatedCalculation = failureMechanism.CalculationsGroup.Children[2] as StructuresCalculation; + Assert.IsNotNull(generatedCalculation); + Assert.AreSame(structure1, generatedCalculation.InputParameters.Structure); } } }