Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r66517b122d50b79f9177a60398424102f23f2d11 -r225ee2a212b464c8bfe5517ad9737f4e0582ccbe --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 66517b122d50b79f9177a60398424102f23f2d11) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 225ee2a212b464c8bfe5517ad9737f4e0582ccbe) @@ -328,15 +328,15 @@ yield return new PropertyInfo, CalculationContextProperties>(); yield return new PropertyInfo { - CreateInstance = context => new DesignWaterLevelCalculationsProperties(GetHydraulicBoundaryLocationCalculations(context.WrappedData, context.GetCalculationFunc)) + CreateInstance = context => new DesignWaterLevelCalculationsProperties(context.WrappedData) }; yield return new PropertyInfo { CreateInstance = context => new DesignWaterLevelCalculationProperties(context.WrappedData) }; yield return new PropertyInfo { - CreateInstance = context => new WaveHeightCalculationsProperties(GetHydraulicBoundaryLocationCalculations(context.WrappedData, context.GetCalculationFunc)) + CreateInstance = context => new WaveHeightCalculationsProperties(context.WrappedData) }; yield return new PropertyInfo { @@ -395,26 +395,26 @@ AfterCreate = (view, context) => view.AssessmentSection = context.Parent }; - yield return new ViewInfo, DesignWaterLevelCalculationsView> + yield return new ViewInfo, DesignWaterLevelCalculationsView> { GetViewName = (view, context) => $"{RingtoetsFormsResources.DesignWaterLevelLocationsContext_DisplayName} - {context.CategoryBoundaryName}", GetViewData = context => context.WrappedData, Image = RingtoetsCommonFormsResources.GenericInputOutputIcon, CloseForData = CloseHydraulicBoundaryCalculationsViewForData, - CreateInstance = context => new DesignWaterLevelCalculationsView(GetHydraulicBoundaryLocationCalculations(context.WrappedData, context.GetCalculationFunc), + CreateInstance = context => new DesignWaterLevelCalculationsView(context.WrappedData, context.AssessmentSection, context.GetNormFunc, context.CategoryBoundaryName), AfterCreate = (view, context) => { view.CalculationGuiService = hydraulicBoundaryLocationCalculationGuiService; } }; - yield return new ViewInfo, WaveHeightCalculationsView> + yield return new ViewInfo, WaveHeightCalculationsView> { GetViewName = (view, context) => $"{RingtoetsFormsResources.WaveHeightLocationsContext_DisplayName} - {context.CategoryBoundaryName}", GetViewData = context => context.WrappedData, Image = RingtoetsCommonFormsResources.GenericInputOutputIcon, CloseForData = CloseHydraulicBoundaryCalculationsViewForData, - CreateInstance = context => new WaveHeightCalculationsView(GetHydraulicBoundaryLocationCalculations(context.WrappedData, context.GetCalculationFunc), + CreateInstance = context => new WaveHeightCalculationsView(context.WrappedData, context.AssessmentSection, context.GetNormFunc, context.CategoryBoundaryName), @@ -1752,7 +1752,7 @@ IAssessmentSection assessmentSection = nodeData.AssessmentSection; hydraulicBoundaryLocationCalculationGuiService.CalculateDesignWaterLevels(assessmentSection.HydraulicBoundaryDatabase.FilePath, assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), - assessmentSection.HydraulicBoundaryDatabase.Locations.Select(l => nodeData.GetCalculationFunc(l)), + nodeData.WrappedData, nodeData.GetNormFunc(), new DesignWaterLevelCalculationMessageProvider(nodeData.CategoryBoundaryName)); }); @@ -1784,7 +1784,7 @@ IAssessmentSection assessmentSection = nodeData.AssessmentSection; hydraulicBoundaryLocationCalculationGuiService.CalculateWaveHeights(assessmentSection.HydraulicBoundaryDatabase.FilePath, assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), - assessmentSection.HydraulicBoundaryDatabase.Locations.Select(l => nodeData.GetCalculationFunc(l)), + nodeData.WrappedData, nodeData.GetNormFunc(), new WaveHeightCalculationMessageProvider(nodeData.CategoryBoundaryName)); }); @@ -1962,25 +1962,21 @@ { return new object[] { - new DesignWaterLevelLocationsContext(context.WrappedData, + new DesignWaterLevelLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.DesignWaterLevelCalculation1), context.AssessmentSection, () => GetFirstHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.DesignWaterLevelCalculation1, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_1), - new DesignWaterLevelLocationsContext(context.WrappedData, + new DesignWaterLevelLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.DesignWaterLevelCalculation2), context.AssessmentSection, () => GetSecondHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.DesignWaterLevelCalculation2, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_2), - new DesignWaterLevelLocationsContext(context.WrappedData, + new DesignWaterLevelLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.DesignWaterLevelCalculation3), context.AssessmentSection, () => GetThirdHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.DesignWaterLevelCalculation3, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_3), - new DesignWaterLevelLocationsContext(context.WrappedData, + new DesignWaterLevelLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.DesignWaterLevelCalculation4), context.AssessmentSection, () => GetFourthHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.DesignWaterLevelCalculation4, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_4) }; } @@ -1989,25 +1985,21 @@ { return new object[] { - new WaveHeightLocationsContext(context.WrappedData, + new WaveHeightLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.WaveHeightCalculation1), context.AssessmentSection, () => GetFirstHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.WaveHeightCalculation1, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_1), - new WaveHeightLocationsContext(context.WrappedData, + new WaveHeightLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.WaveHeightCalculation2), context.AssessmentSection, () => GetSecondHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.WaveHeightCalculation2, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_2), - new WaveHeightLocationsContext(context.WrappedData, + new WaveHeightLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.WaveHeightCalculation3), context.AssessmentSection, () => GetThirdHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.WaveHeightCalculation3, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_3), - new WaveHeightLocationsContext(context.WrappedData, + new WaveHeightLocationsContext(GetHydraulicBoundaryLocationCalculations(context.WrappedData, hbl => hbl.WaveHeightCalculation4), context.AssessmentSection, () => GetFourthHydraulicBoundaryNorm(context.AssessmentSection), - hbl => hbl.WaveHeightCalculation4, RingtoetsIntegrationPluginResources.Hydraulic_category_boundary_name_4) }; } Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveHeightLocationsGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rdae81a0c2c8d8719cb8d7777a38b2e182d174c6f -r225ee2a212b464c8bfe5517ad9737f4e0582ccbe --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveHeightLocationsGroupContextTreeNodeInfoTest.cs (.../WaveHeightLocationsGroupContextTreeNodeInfoTest.cs) (revision dae81a0c2c8d8719cb8d7777a38b2e182d174c6f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveHeightLocationsGroupContextTreeNodeInfoTest.cs (.../WaveHeightLocationsGroupContextTreeNodeInfoTest.cs) (revision 225ee2a212b464c8bfe5517ad9737f4e0582ccbe) @@ -33,7 +33,6 @@ using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; -using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Forms.PresentationObjects; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;