Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r4e6c8ac0eb663ddfe4565745fb4829a8432019e2 -rc9396d0af18873fda14c7e486decbfca7d4e8b21 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 4e6c8ac0eb663ddfe4565745fb4829a8432019e2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision c9396d0af18873fda14c7e486decbfca7d4e8b21) @@ -70,9 +70,20 @@ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(HeightStructuresCalculationGroupContext)); } + public override void TearDown() + { + plugin.Dispose(); + mocks.VerifyAll(); + + base.TearDown(); + } + [Test] public void Initialized_Always_ExpectedPropertiesSet() { + // Setup + mocks.ReplayAll(); + // Assert Assert.AreEqual(typeof(HeightStructuresCalculationGroupContext), info.TagType); Assert.IsNotNull(info.Text); @@ -112,7 +123,6 @@ // Assert CollectionAssert.IsEmpty(children); - mocks.VerifyAll(); } [Test] @@ -149,7 +159,6 @@ var calculationContext = (HeightStructuresCalculationContext) children[2]; Assert.AreSame(childCalculation, calculationContext.WrappedData); Assert.AreSame(assessmentSectionMock, calculationContext.AssessmentSection); - mocks.VerifyAll(); } [Test] @@ -191,7 +200,7 @@ info.ContextMenuStrip(groupContext, null, treeViewControl); } // Assert - mocks.VerifyAll(); + // Assert expectancies called in TearDown() } [Test] @@ -238,7 +247,6 @@ RingtoetsFormsResources.ClearIcon, false); } - mocks.VerifyAll(); } [Test] @@ -285,7 +293,7 @@ info.ContextMenuStrip(groupContext, parentGroupContext, treeViewControl); } // Assert - mocks.VerifyAll(); + // Assert expectancies called in TearDown() } [Test] @@ -336,7 +344,6 @@ RingtoetsFormsResources.ClearIcon, false); } - mocks.VerifyAll(); } [Test] @@ -381,7 +388,6 @@ RingtoetsFormsResources.CalculateAllIcon, false); } - mocks.VerifyAll(); } [Test] @@ -433,7 +439,6 @@ RingtoetsFormsResources.CalculateAllIcon, false); } - mocks.VerifyAll(); } [Test] @@ -486,7 +491,6 @@ TestHelper.AssertImagesAreEqual(RingtoetsFormsResources.CalculateAllIcon, contextMenuItem.Image); Assert.IsFalse(contextMenuItem.Enabled); } - mocks.VerifyAll(); } [Test] @@ -545,7 +549,6 @@ RingtoetsFormsResources.CalculationGroup_CalculateAll_ToolTip, RingtoetsFormsResources.CalculateIcon); } - mocks.VerifyAll(); } [Test] @@ -627,7 +630,6 @@ Assert.AreEqual("Uitvoeren van 'B' is mislukt.", messageList[11]); }); } - mocks.VerifyAll(); } [Test] @@ -673,7 +675,6 @@ Assert.AreEqual("Nieuwe map (1)", newlyAddedItem.Name, "An item with the same name default name already exists, therefore '(1)' needs to be appended."); } - mocks.VerifyAll(); } [Test] @@ -718,7 +719,6 @@ Assert.AreEqual("Nieuwe berekening (1)", newlyAddedItem.Name, "An item with the same name default name already exists, therefore '(1)' needs to be appended."); } - mocks.VerifyAll(); } [Test] @@ -752,7 +752,6 @@ // Assert CollectionAssert.DoesNotContain(parentGroup.Children, group); - mocks.VerifyAll(); } [Test] @@ -788,7 +787,6 @@ // Assert CollectionAssert.DoesNotContain(parentGroup.Children, group); - mocks.VerifyAll(); } private const int contextMenuAddCalculationGroupIndexRootGroup = 1;