Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs =================================================================== diff -u -r06d2a1e1525e818b3e71c4bcd61778e1ef4b2df7 -r693eac6aa89f3771b5da763d1680af91661dc392 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs (.../StochasticSoilModelCollectionContextTreeNodeInfoTest.cs) (revision 06d2a1e1525e818b3e71c4bcd61778e1ef4b2df7) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/StochasticSoilModelCollectionContextTreeNodeInfoTest.cs (.../StochasticSoilModelCollectionContextTreeNodeInfoTest.cs) (revision 693eac6aa89f3771b5da763d1680af91661dc392) @@ -64,10 +64,12 @@ } [TearDown] - public void TearDown() + public override void TearDown() { plugin.Dispose(); mocks.VerifyAll(); + + base.TearDown(); } [Test] @@ -365,61 +367,6 @@ [Test] [Apartment(ApartmentState.STA)] - public void ContextMenuStrip_ClickOnUpdateStochasticSoilModelsWithNonExistingSourceFilePathItemOkClicked_OpenFileDialogShownSuccessMessageLogged() - { - // Setup - const string somePath = "some path"; - string testDirectory = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Piping.IO, "StochasticSoilModelDatabaseReader"); - string existingFilePath = Path.Combine(testDirectory, "emptyschema.soil"); - - using (var treeViewControl = new TreeViewControl()) - { - var pipingFailureMechanism = new PipingFailureMechanism(); - var assessmentSectionMock = mocks.StrictMock(); - var stochasticSoilModelCollection = new StochasticSoilModelCollection(); - stochasticSoilModelCollection.AddRange(Enumerable.Empty(), somePath); - - var nodeData = new StochasticSoilModelCollectionContext(stochasticSoilModelCollection, - pipingFailureMechanism, - assessmentSectionMock); - - var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); - - var gui = mocks.StrictMock(); - gui.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); - - var mainWindow = mocks.Stub(); - gui.Stub(g => g.MainWindow).Return(mainWindow); - - mocks.ReplayAll(); - - plugin.Gui = gui; - - DialogBoxHandler = (name, wnd) => - { - var window = new OpenFileDialogTester(wnd); - DialogBoxHandler = (s, hWnd) => - { - }; - window.OpenFile(existingFilePath); - }; - - using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) - { - // Call - Action test = () => menu.Items[updateStochasticSoilModelsItemIndex].PerformClick(); - - // Assert - TestHelper.AssertLogMessageIsGenerated( - test, - "Uitvoeren van 'Bijwerken van stochastische ondergrondmodellen.' is gelukt."); - } - } - } - - [Test] - [Apartment(ApartmentState.STA)] public void ContextMenuStrip_ClickOnUpdateStochasticSoilModelsWithExistingSourceFilePath_SuccessMessageLogged() { // Setup