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());