Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r73bb4932d13d36d1cd3cd30d8151f2adf49646f2 -r396e74911bf83a7fe62c223b197ed0572889fd6d --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 73bb4932d13d36d1cd3cd30d8151f2adf49646f2) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 396e74911bf83a7fe62c223b197ed0572889fd6d) @@ -379,11 +379,13 @@ private static object[] FailureMechanismEnabledChildNodeObjects(HeightStructuresFailureMechanismContext context) { HeightStructuresFailureMechanism wrappedData = context.WrappedData; + IAssessmentSection assessmentSection = context.Parent; + return new object[] { - new CategoryTreeFolder(RingtoetsCommonFormsResources.FailureMechanism_Inputs_DisplayName, GetInputs(wrappedData, context.Parent), TreeFolderCategory.Input), - new HeightStructuresCalculationGroupContext(wrappedData.CalculationsGroup, null, wrappedData, context.Parent), - new CategoryTreeFolder(RingtoetsCommonFormsResources.FailureMechanism_Outputs_DisplayName, GetOutputs(wrappedData, context.Parent), TreeFolderCategory.Output) + new CategoryTreeFolder(RingtoetsCommonFormsResources.FailureMechanism_Inputs_DisplayName, GetInputs(wrappedData, assessmentSection), TreeFolderCategory.Input), + new HeightStructuresCalculationGroupContext(wrappedData.CalculationsGroup, null, wrappedData, assessmentSection), + new CategoryTreeFolder(RingtoetsCommonFormsResources.FailureMechanism_Outputs_DisplayName, GetOutputs(wrappedData, assessmentSection), TreeFolderCategory.Output) }; } @@ -402,6 +404,7 @@ { return new object[] { + new FailureMechanismAssemblyCategoriesContext(failureMechanism, assessmentSection, () => failureMechanism.GeneralInput.N), new HeightStructuresScenariosContext(failureMechanism.CalculationsGroup, failureMechanism), new ProbabilityFailureMechanismSectionResultContext( failureMechanism.SectionResults, failureMechanism, assessmentSection), Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r33ce6fa967e380d4c68bd5f53acc189ab7f1e726 -r396e74911bf83a7fe62c223b197ed0572889fd6d --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 33ce6fa967e380d4c68bd5f53acc189ab7f1e726) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 396e74911bf83a7fe62c223b197ed0572889fd6d) @@ -156,17 +156,22 @@ Assert.AreEqual("Oordeel", outputsFolder.Name); Assert.AreEqual(TreeFolderCategory.Output, outputsFolder.Category); - Assert.AreEqual(3, outputsFolder.Contents.Count()); - var scenariosContext = (HeightStructuresScenariosContext) outputsFolder.Contents.ElementAt(0); + Assert.AreEqual(4, outputsFolder.Contents.Count()); + var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0); + Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData); + Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection); + Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc()); + + var scenariosContext = (HeightStructuresScenariosContext) outputsFolder.Contents.ElementAt(1); Assert.AreSame(failureMechanism, scenariosContext.ParentFailureMechanism); Assert.AreSame(failureMechanism.CalculationsGroup, scenariosContext.WrappedData); - var failureMechanismResultsContext = (ProbabilityFailureMechanismSectionResultContext) outputsFolder.Contents.ElementAt(1); + var failureMechanismResultsContext = (ProbabilityFailureMechanismSectionResultContext) outputsFolder.Contents.ElementAt(2); Assert.AreSame(failureMechanism, failureMechanismResultsContext.FailureMechanism); Assert.AreSame(failureMechanism.SectionResults, failureMechanismResultsContext.WrappedData); Assert.AreSame(assessmentSection, failureMechanismResultsContext.AssessmentSection); - var outputComment = (Comment) outputsFolder.Contents.ElementAt(2); + var outputComment = (Comment) outputsFolder.Contents.ElementAt(3); Assert.AreSame(failureMechanism.OutputComments, outputComment); } @@ -231,6 +236,7 @@ // Call info.ContextMenuStrip(failureMechanismContext, null, treeViewControl); } + // Assert // Assert expectancies are called in TearDown() } @@ -268,6 +274,7 @@ // Call info.ContextMenuStrip(failureMechanismContext, null, treeViewControl); } + // Assert // Assert expectancies are called in TearDown() }