Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -rbf6f075099ac4af95a9c0065604d2c5a8a55cf8d -r28cd7ff42aaa05cbb9a989570793d7874a8e41ea --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision bf6f075099ac4af95a9c0065604d2c5a8a55cf8d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 28cd7ff42aaa05cbb9a989570793d7874a8e41ea) @@ -408,7 +408,8 @@ CreateInstance = context => new DesignWaterLevelLocationsView(context.WrappedData, context.GetCalculationFunc, context.AssessmentSection, - context.GetNormFunc), + context.GetNormFunc, + context.CategoryBoundaryName), AfterCreate = (view, context) => { view.CalculationGuiService = hydraulicBoundaryLocationCalculationGuiService; } }; @@ -421,7 +422,8 @@ CreateInstance = context => new WaveHeightLocationsView(context.WrappedData, context.GetCalculationFunc, context.AssessmentSection, - context.GetNormFunc), + context.GetNormFunc, + context.CategoryBoundaryName), AfterCreate = (view, context) => { view.CalculationGuiService = hydraulicBoundaryLocationCalculationGuiService; } }; Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/DesignWaterLevelLocationsViewInfoTest.cs =================================================================== diff -u -rb68aeb86a9034514bee88a54bdc7307896d6c157 -r28cd7ff42aaa05cbb9a989570793d7874a8e41ea --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/DesignWaterLevelLocationsViewInfoTest.cs (.../DesignWaterLevelLocationsViewInfoTest.cs) (revision b68aeb86a9034514bee88a54bdc7307896d6c157) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/DesignWaterLevelLocationsViewInfoTest.cs (.../DesignWaterLevelLocationsViewInfoTest.cs) (revision 28cd7ff42aaa05cbb9a989570793d7874a8e41ea) @@ -217,6 +217,8 @@ { // Setup Func getNormFunc = () => 0.01; + const string categoryBoundaryName = "Category"; + var hydraulicBoundaryLocations = new ObservableList(); var hydraulicBoundaryLocationsLookup = new Dictionary { @@ -238,18 +240,20 @@ new ObservableTestAssessmentSectionStub(), getNormFunc, getCalculationFunc, - "Category"); + categoryBoundaryName); var mockRepository = new MockRepository(); var guiService = mockRepository.StrictMock(); double actualNormValue = double.NaN; Func actualGetCalculationFuncValue = null; + var actualCategoryBoundaryNameValue = ""; guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { actualGetCalculationFuncValue = (Func) invocation.Arguments[3]; actualNormValue = (double) invocation.Arguments[4]; + actualCategoryBoundaryNameValue = (string) invocation.Arguments[5]; }); mockRepository.ReplayAll(); @@ -279,6 +283,7 @@ Assert.AreEqual(getNormFunc(), actualNormValue); Assert.AreSame(getCalculationFunc, actualGetCalculationFuncValue); + Assert.AreEqual(categoryBoundaryName, actualCategoryBoundaryNameValue); } } @@ -303,16 +308,20 @@ var assessmentSection = new ObservableTestAssessmentSectionStub(); var locations = new ObservableList(); + const string categoryBoundaryName = "Category"; + var context = new DesignWaterLevelLocationsContext(locations, assessmentSection, getNormFunc, hbl => new HydraulicBoundaryLocationCalculation(), - "Category"); + categoryBoundaryName); using (var view = new DesignWaterLevelLocationsView(locations, hbl => new HydraulicBoundaryLocationCalculation(), new ObservableTestAssessmentSectionStub(), - getNormFunc)) + getNormFunc, + categoryBoundaryName)) + using (var ringtoetsPlugin = new RingtoetsPlugin()) { info = ringtoetsPlugin.GetViewInfos().First(tni => tni.ViewType == typeof(DesignWaterLevelLocationsView)); @@ -338,7 +347,8 @@ using (var view = new DesignWaterLevelLocationsView(new ObservableList(), hbl => new HydraulicBoundaryLocationCalculation(), assessmentSection, - () => 0.01)) + () => 0.01, + "Category")) { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -358,7 +368,8 @@ using (var view = new DesignWaterLevelLocationsView(new ObservableList(), hbl => new HydraulicBoundaryLocationCalculation(), assessmentSectionA, - () => 0.01)) + () => 0.01, + "Category")) { // Call bool closeForData = info.CloseForData(view, assessmentSectionB); @@ -377,7 +388,8 @@ using (var view = new DesignWaterLevelLocationsView(new ObservableList(), hbl => new HydraulicBoundaryLocationCalculation(), assessmentSectionA, - () => 0.01)) + () => 0.01, + "Category")) { // Call bool closeForData = info.CloseForData(view, new object()); Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/WaveHeightLocationsViewInfoTest.cs =================================================================== diff -u -rb68aeb86a9034514bee88a54bdc7307896d6c157 -r28cd7ff42aaa05cbb9a989570793d7874a8e41ea --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/WaveHeightLocationsViewInfoTest.cs (.../WaveHeightLocationsViewInfoTest.cs) (revision b68aeb86a9034514bee88a54bdc7307896d6c157) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/WaveHeightLocationsViewInfoTest.cs (.../WaveHeightLocationsViewInfoTest.cs) (revision 28cd7ff42aaa05cbb9a989570793d7874a8e41ea) @@ -218,6 +218,8 @@ { // Setup Func getNormFunc = () => 0.01; + const string categoryBoundaryName = "Category"; + var hydraulicBoundaryLocations = new ObservableList(); var hydraulicBoundaryLocationsLookup = new Dictionary { @@ -239,18 +241,20 @@ new ObservableTestAssessmentSectionStub(), getNormFunc, getCalculationFunc, - "Category"); + categoryBoundaryName); var mockRepository = new MockRepository(); var guiService = mockRepository.StrictMock(); double actualNormValue = double.NaN; Func actualGetCalculationFuncValue = null; + var actualCategoryBoundaryNameValue = ""; guiService.Expect(ch => ch.CalculateWaveHeights(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { actualGetCalculationFuncValue = (Func) invocation.Arguments[3]; actualNormValue = (double) invocation.Arguments[4]; + actualCategoryBoundaryNameValue = (string) invocation.Arguments[5]; }); mockRepository.ReplayAll(); @@ -280,6 +284,7 @@ Assert.AreEqual(getNormFunc(), actualNormValue); Assert.AreSame(getCalculationFunc, actualGetCalculationFuncValue); + Assert.AreEqual(categoryBoundaryName, actualCategoryBoundaryNameValue); } } @@ -305,16 +310,20 @@ var assessmentSection = new ObservableTestAssessmentSectionStub(); var locations = new ObservableList(); + const string categoryBoundaryName = "Category"; + var context = new WaveHeightLocationsContext(locations, assessmentSection, getNormFunc, hbl => new HydraulicBoundaryLocationCalculation(), - "Category"); + categoryBoundaryName); using (var view = new WaveHeightLocationsView(locations, hbl => new HydraulicBoundaryLocationCalculation(), assessmentSection, - getNormFunc)) + getNormFunc, + categoryBoundaryName)) + using (var ringtoetsPlugin = new RingtoetsPlugin()) { info = ringtoetsPlugin.GetViewInfos().First(tni => tni.ViewType == typeof(WaveHeightLocationsView)); @@ -340,7 +349,8 @@ using (var view = new WaveHeightLocationsView(new ObservableList(), hbl => new HydraulicBoundaryLocationCalculation(), assessmentSection, - () => 0.01)) + () => 0.01, + "Category")) { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -360,7 +370,8 @@ using (var view = new WaveHeightLocationsView(new ObservableList(), hbl => new HydraulicBoundaryLocationCalculation(), assessmentSectionA, - () => 0.01)) + () => 0.01, + "Category")) { // Call bool closeForData = info.CloseForData(view, assessmentSectionB); @@ -379,7 +390,8 @@ using (var view = new WaveHeightLocationsView(new ObservableList(), hbl => new HydraulicBoundaryLocationCalculation(), assessmentSectionA, - () => 0.01)) + () => 0.01, + "Category")) { // Call bool closeForData = info.CloseForData(view, new object());