Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationsContextTreeNodeInfoTest.cs =================================================================== diff -u -r6de038d3fc5650090a24c1b6d0afb0bb39774ede -r7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationsContextTreeNodeInfoTest.cs (.../DuneLocationsContextTreeNodeInfoTest.cs) (revision 6de038d3fc5650090a24c1b6d0afb0bb39774ede) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationsContextTreeNodeInfoTest.cs (.../DuneLocationsContextTreeNodeInfoTest.cs) (revision 7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b) @@ -207,16 +207,13 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemCalculateAllDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemCalculateAllDisabledAndTooltipSet() { // Setup using (var treeViewControl = new TreeViewControl()) { - var assessmentSection = mocks.Stub(); - var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase); - var failureMechanism = new DuneErosionFailureMechanism { Contribution = 10 Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r67ba2648fe0a4a86df6320b2d009626f02d93662 -r7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision 67ba2648fe0a4a86df6320b2d009626f02d93662) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision 7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b) @@ -906,7 +906,7 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemCalculateAllDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemCalculateAllDisabledAndTooltipSet() { // Setup var group = new CalculationGroup @@ -920,8 +920,7 @@ var failureMechanism = new TestGrassCoverErosionInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(new GrassCoverErosionInwardsCalculation()); - var assessmentSection = mocks.Stub(); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); var nodeData = new GrassCoverErosionInwardsCalculationGroupContext(group, null, Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r44cf5bc0f292171637b0c91b74005effe4d2798c -r7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 44cf5bc0f292171637b0c91b74005effe4d2798c) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b) @@ -447,14 +447,13 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemCalculateAllDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemCalculateAllDisabledAndTooltipSet() { // Setup var failureMechanism = new TestGrassCoverErosionInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(new GrassCoverErosionInwardsCalculation()); - var assessmentSection = mocksRepository.Stub(); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mocksRepository, "invalidFilePath"); var nodeData = new GrassCoverErosionInwardsFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs =================================================================== diff -u -rc8b539cf2c3d5d46b91c5c0c7c0a9a69b713c13f -r7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs) (revision c8b539cf2c3d5d46b91c5c0c7c0a9a69b713c13f) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextTreeNodeInfoTest.cs) (revision 7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b) @@ -185,18 +185,18 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemCalculateAllDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemCalculateAllDisabledAndTooltipSet() { // Setup - var assessmentSection = mockRepository.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mockRepository, "invalidFilePath"); + var applicationFeatureCommandHandler = mockRepository.Stub(); var importCommandHandler = mockRepository.Stub(); var exportCommandHandler = mockRepository.Stub(); var updateCommandHandler = mockRepository.Stub(); var viewCommandsHandler = mockRepository.Stub(); viewCommandsHandler.Stub(vch => vch.CanOpenViewFor(null)).IgnoreArguments().Return(true); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); using (var treeViewControl = new TreeViewControl()) { Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs =================================================================== diff -u -rc8b539cf2c3d5d46b91c5c0c7c0a9a69b713c13f -r7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs) (revision c8b539cf2c3d5d46b91c5c0c7c0a9a69b713c13f) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsContextTreeNodeInfoTest.cs) (revision 7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b) @@ -182,17 +182,17 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemCalculateAllDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemCalculateAllDisabledAndTooltipSet() { // Setup - var assessmentSection = mockRepository.Stub(); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mockRepository, "invalidFilePath"); var applicationFeatureCommandHandler = mockRepository.Stub(); var importCommandHandler = mockRepository.Stub(); var exportCommandHandler = mockRepository.Stub(); var updateCommandHandler = mockRepository.Stub(); var viewCommandsHandler = mockRepository.Stub(); + viewCommandsHandler.Stub(vch => vch.CanOpenViewFor(null)).IgnoreArguments().Return(true); using (var treeViewControl = new TreeViewControl()) Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r44cf5bc0f292171637b0c91b74005effe4d2798c -r7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 44cf5bc0f292171637b0c91b74005effe4d2798c) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 7da4bf0d587e7cf9f69336d2ea5519af38dbfc0b) @@ -462,14 +462,13 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemCalculateAllDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemCalculateAllDisabledAndTooltipSet() { // Setup var failureMechanism = new TestHeightStructuresFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); - var assessmentSection = mocksRepository.Stub(); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mocksRepository, "invalidFilePath"); var nodeData = new HeightStructuresFailureMechanismContext(failureMechanism, assessmentSection); var menuBuilder = new CustomItemsOnlyContextMenuBuilder();