Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r67ba2648fe0a4a86df6320b2d009626f02d93662 -r5c612adff7d4fa867750f65c5cf14105b4a3bad0 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 67ba2648fe0a4a86df6320b2d009626f02d93662) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 5c612adff7d4fa867750f65c5cf14105b4a3bad0) @@ -271,7 +271,7 @@ public void ContextMenuStrip_CalculationWithoutDikeProfile_ContextMenuItemUpdateDikeProfileDisabledAndToolTipSet() { // Setup - var assessmentSection = mocks.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); var calculation = new GrassCoverErosionInwardsCalculation(); @@ -305,7 +305,7 @@ public void ContextMenuStrip_CalculationWithDikeProfileAndInputInSync_ContextMenuItemUpdateDikeProfileDisabledAndToolTipSet() { // Setup - var assessmentSection = mocks.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); var calculation = new GrassCoverErosionInwardsCalculation @@ -345,7 +345,7 @@ public void ContextMenuStrip_CalculationWithDikeProfileAndInputOutOfSync_ContextMenuItemUpdateDikeProfileEnabledAndToolTipSet() { // Setup - var assessmentSection = mocks.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(mocks); DikeProfile dikeProfile = DikeProfileTestFactory.CreateDikeProfile(); var parent = new CalculationGroup(); @@ -561,10 +561,10 @@ } [Test] - public void ContextMenuStrip_NoHydraulicBoundaryDatabase_ContextMenuItemPerformCalculationDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseNotCoupled_ContextMenuItemPerformCalculationDisabledAndTooltipSet() { // Setup - var assessmentSection = mocks.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); var calculation = new GrassCoverErosionInwardsCalculation(); var failureMechanism = new TestGrassCoverErosionInwardsFailureMechanism(); @@ -592,17 +592,15 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemPerformCalculationDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemPerformCalculationDisabledAndTooltipSet() { // Setup - var assessmentSection = mocks.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); var parent = new CalculationGroup(); var calculation = new GrassCoverErosionInwardsCalculation(); var failureMechanism = new TestGrassCoverErosionInwardsFailureMechanism(); var nodeData = new GrassCoverErosionInwardsCalculationContext(calculation, parent, failureMechanism, assessmentSection); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); - using (var treeViewControl = new TreeViewControl()) { var gui = mocks.Stub(); @@ -701,10 +699,10 @@ } [Test] - public void ContextMenuStrip_NoHydraulicBoundaryDatabase_ContextMenuItemValidateCalculationDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseNotCoupled_ContextMenuItemValidateCalculationDisabledAndTooltipSet() { // Setup - var assessmentSection = mocks.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(mocks); var parent = new CalculationGroup(); var calculation = new GrassCoverErosionInwardsCalculation(); var failureMechanism = new TestGrassCoverErosionInwardsFailureMechanism(); @@ -732,17 +730,15 @@ } [Test] - public void ContextMenuStrip_HydraulicBoundaryDatabaseNotValid_ContextMenuItemValidateCalculationDisabledAndTooltipSet() + public void ContextMenuStrip_HydraulicBoundaryDatabaseCoupledToInvalidFile_ContextMenuItemValidateCalculationDisabledAndTooltipSet() { // Setup - var assessmentSection = mocks.Stub(); + IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(null, mocks, "invalidFilePath"); var parent = new CalculationGroup(); var calculation = new GrassCoverErosionInwardsCalculation(); var failureMechanism = new TestGrassCoverErosionInwardsFailureMechanism(); var nodeData = new GrassCoverErosionInwardsCalculationContext(calculation, parent, failureMechanism, assessmentSection); - assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); - using (var treeViewControl = new TreeViewControl()) { var gui = mocks.Stub();