Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveHeightLocationsContextTreeNodeInfoTest.cs =================================================================== diff -u -rf9302ac7b9aaba301867d26c87c226da5b46572e -r4029646d82784e4f99d6528a9f339fb053f4db64 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveHeightLocationsContextTreeNodeInfoTest.cs (.../WaveHeightLocationsContextTreeNodeInfoTest.cs) (revision f9302ac7b9aaba301867d26c87c226da5b46572e) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveHeightLocationsContextTreeNodeInfoTest.cs (.../WaveHeightLocationsContextTreeNodeInfoTest.cs) (revision 4029646d82784e4f99d6528a9f339fb053f4db64) @@ -225,10 +225,9 @@ // Setup IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mockRepository, "invalidFilePath"); - var nodeData = new WaveHeightLocationsContext(assessmentSection.HydraulicBoundaryDatabase.Locations, + var nodeData = new WaveHeightLocationsContext(new ObservableList(), assessmentSection, () => 0.01, - hbl => new HydraulicBoundaryLocationCalculation(hbl), "Category"); using (var treeViewControl = new TreeViewControl()) @@ -274,10 +273,9 @@ var assessmentSection = mockRepository.Stub(); assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); - var nodeData = new WaveHeightLocationsContext(hydraulicBoundaryDatabase.Locations, + var nodeData = new WaveHeightLocationsContext(new ObservableList(), assessmentSection, () => 0.01, - hbl => new HydraulicBoundaryLocationCalculation(hbl), "Category"); using (var treeViewControl = new TreeViewControl()) @@ -315,24 +313,25 @@ public void CalculateWaveHeightsFromContextMenu_HydraulicBoundaryDatabaseWithCanUsePreprocessorFalse_SendsRightInputToCalculationService() { // Setup - var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation("locationName"); var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) { HydraulicBoundaryDatabase = { - Locations = - { - hydraulicBoundaryLocation - }, FilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite") } }; Func getNormFunc = () => 0.01; - var context = new WaveHeightLocationsContext(assessmentSection.HydraulicBoundaryDatabase.Locations, + + var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation("locationName"); + var hydraulicBoundaryLocationCalculations = new ObservableList + { + new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation) + }; + + var context = new WaveHeightLocationsContext(hydraulicBoundaryLocationCalculations, assessmentSection, getNormFunc, - hbl => new HydraulicBoundaryLocationCalculation(hbl), "Category"); using (var treeViewControl = new TreeViewControl()) @@ -384,15 +383,10 @@ { // Setup string preprocessorDirectory = TestHelper.GetScratchPadPath(); - var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation("locationName"); var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) { HydraulicBoundaryDatabase = { - Locations = - { - hydraulicBoundaryLocation - }, FilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"), CanUsePreprocessor = true, UsePreprocessor = true, @@ -401,10 +395,16 @@ }; Func getNormFunc = () => 0.01; - var context = new WaveHeightLocationsContext(assessmentSection.HydraulicBoundaryDatabase.Locations, + + var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation("locationName"); + var hydraulicBoundaryLocationCalculations = new ObservableList + { + new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation) + }; + + var context = new WaveHeightLocationsContext(hydraulicBoundaryLocationCalculations, assessmentSection, getNormFunc, - hbl => new HydraulicBoundaryLocationCalculation(hbl), "Category"); using (var treeViewControl = new TreeViewControl()) @@ -455,15 +455,10 @@ public void CalculateWaveHeightsFromContextMenu_HydraulicBoundaryDatabaseWithUsePreprocessorFalse_SendsRightInputToCalculationService() { // Setup - var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation("locationName"); var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) { HydraulicBoundaryDatabase = { - Locations = - { - hydraulicBoundaryLocation - }, FilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"), CanUsePreprocessor = true, UsePreprocessor = false, @@ -472,10 +467,16 @@ }; Func getNormFunc = () => 0.01; - var context = new WaveHeightLocationsContext(assessmentSection.HydraulicBoundaryDatabase.Locations, + + var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation("locationName"); + var hydraulicBoundaryLocationCalculations = new ObservableList + { + new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation) + }; + + var context = new WaveHeightLocationsContext(hydraulicBoundaryLocationCalculations, assessmentSection, getNormFunc, - hbl => new HydraulicBoundaryLocationCalculation(hbl), "Category"); using (var treeViewControl = new TreeViewControl()) @@ -527,26 +528,26 @@ { // Given const string locationName = "locationName"; - var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(locationName); var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) { HydraulicBoundaryDatabase = { - Locations = - { - hydraulicBoundaryLocation - }, FilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite") }, Id = string.Empty }; const string categoryBoundaryName = "Category"; - var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation); - var context = new WaveHeightLocationsContext(assessmentSection.HydraulicBoundaryDatabase.Locations, + + var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation("locationName")); + var hydraulicBoundaryLocationCalculations = new ObservableList + { + hydraulicBoundaryLocationCalculation + }; + + var context = new WaveHeightLocationsContext(hydraulicBoundaryLocationCalculations, assessmentSection, () => 0.01, - hbl => hydraulicBoundaryLocationCalculation, categoryBoundaryName); using (var treeViewControl = new TreeViewControl())