Index: Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeView.cs
===================================================================
diff -u -r622c20f6fc0b693b67a3e57b2ece939823002c62 -r482a3c997bd68b3b524639518cb488335caf02e8
--- Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeView.cs (.../TreeView.cs) (revision 622c20f6fc0b693b67a3e57b2ece939823002c62)
+++ Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeView.cs (.../TreeView.cs) (revision 482a3c997bd68b3b524639518cb488335caf02e8)
@@ -302,12 +302,12 @@
{
if (!SelectedNodeCanDelete())
{
- MessageBox.Show(Resources.TreeView_DeleteNodeData_The_selected_item_cannot_be_removed, Resources.TreeView_DeleteNodeData_Confirm, MessageBoxButtons.OK);
+ System.Windows.Forms.MessageBox.Show(Resources.TreeView_DeleteNodeData_The_selected_item_cannot_be_removed, Resources.TreeView_DeleteNodeData_Confirm, MessageBoxButtons.OK);
return;
}
var message = string.Format(Resources.TreeView_DeleteNodeData_Are_you_sure_you_want_to_delete_the_following_item_0_, SelectedNode.Text);
- if (MessageBox.Show(message, Resources.TreeView_DeleteNodeData_Confirm, MessageBoxButtons.OKCancel) != DialogResult.OK)
+ if (System.Windows.Forms.MessageBox.Show(message, Resources.TreeView_DeleteNodeData_Confirm, MessageBoxButtons.OKCancel) != DialogResult.OK)
{
return;
}
Index: Core/Common/test/Core.Common.Controls.Swf.Test/Core.Common.Controls.Swf.Test.csproj
===================================================================
diff -u -r8edb2d095875f04c7378a1da9361fb1c266828e2 -r482a3c997bd68b3b524639518cb488335caf02e8
--- Core/Common/test/Core.Common.Controls.Swf.Test/Core.Common.Controls.Swf.Test.csproj (.../Core.Common.Controls.Swf.Test.csproj) (revision 8edb2d095875f04c7378a1da9361fb1c266828e2)
+++ Core/Common/test/Core.Common.Controls.Swf.Test/Core.Common.Controls.Swf.Test.csproj (.../Core.Common.Controls.Swf.Test.csproj) (revision 482a3c997bd68b3b524639518cb488335caf02e8)
@@ -56,6 +56,10 @@
..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
+
+ False
+ ..\..\..\..\lib\NUnitForms.dll
+
..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll
Index: Core/Common/test/Core.Common.Controls.Swf.Test/TreeViewControls/TreeViewTest.cs
===================================================================
diff -u -rdc06f24147cb5d1f94cec6f3705d07dc3142d175 -r482a3c997bd68b3b524639518cb488335caf02e8
--- Core/Common/test/Core.Common.Controls.Swf.Test/TreeViewControls/TreeViewTest.cs (.../TreeViewTest.cs) (revision dc06f24147cb5d1f94cec6f3705d07dc3142d175)
+++ Core/Common/test/Core.Common.Controls.Swf.Test/TreeViewControls/TreeViewTest.cs (.../TreeViewTest.cs) (revision 482a3c997bd68b3b524639518cb488335caf02e8)
@@ -9,6 +9,7 @@
using Core.Common.Controls.Swf.TreeViewControls;
using Core.Common.TestUtils;
using Core.Common.Utils.Collections.Generic;
+using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
using TreeNode = Core.Common.Controls.Swf.TreeViewControls.TreeNode;
@@ -17,7 +18,7 @@
namespace Core.Common.Controls.Swf.Test.TreeViewControls
{
[TestFixture]
- public class TreeViewTest
+ public class TreeViewTest : WindowsFormsTestBase
{
private readonly MockRepository mockRepository = new MockRepository();
@@ -322,6 +323,8 @@
[Test]
public void DeletedNodeMovesSelectionToItsParentNode()
{
+ ExpectModal("Bevestigen", "MessageBoxHandler");
+
using (var treeView = new TreeView())
{
treeView.NodePresenters.Add(new ParentNodePresenter());
@@ -552,5 +555,10 @@
isLoaded = value;
}
}
+
+ public void MessageBoxHandler()
+ {
+ new MessageBoxTester("Bevestigen").ClickOk();
+ }
}
}
\ No newline at end of file
Index: Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/GuiImportHandlerTest.cs
===================================================================
diff -u -rd64c53911d1dcd19f9769d0fc637a1f7559ffbdb -r482a3c997bd68b3b524639518cb488335caf02e8
--- Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision d64c53911d1dcd19f9769d0fc637a1f7559ffbdb)
+++ Core/Common/test/Core.Common.Integration.Test/Ringtoets/Application.Ringtoets/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision 482a3c997bd68b3b524639518cb488335caf02e8)
@@ -1,14 +1,15 @@
using System;
using Core.Common.Base.Plugin;
using Core.Common.Gui;
+using Core.Common.TestUtils;
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
namespace Core.Common.Integration.Test.Ringtoets.Application.Ringtoets
{
[TestFixture]
- public class GuiImportHandlerTest : NUnitFormTest
+ public class GuiImportHandlerTest : WindowsFormsTestBase
{
private MockRepository mocks;
private IGui gui;
Index: Core/Common/test/Core.Common.TestUtils/Core.Common.TestUtils.csproj
===================================================================
diff -u -rb5ea48631445312a26944f9d979c34b9132d16e7 -r482a3c997bd68b3b524639518cb488335caf02e8
--- Core/Common/test/Core.Common.TestUtils/Core.Common.TestUtils.csproj (.../Core.Common.TestUtils.csproj) (revision b5ea48631445312a26944f9d979c34b9132d16e7)
+++ Core/Common/test/Core.Common.TestUtils/Core.Common.TestUtils.csproj (.../Core.Common.TestUtils.csproj) (revision 482a3c997bd68b3b524639518cb488335caf02e8)
@@ -74,6 +74,9 @@
..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
True
+
+ ..\..\..\..\lib\NUnitForms.dll
+
@@ -104,6 +107,7 @@
+
Form
Index: Core/Common/test/Core.Common.TestUtils/WindowsFormsTestBase.cs
===================================================================
diff -u
--- Core/Common/test/Core.Common.TestUtils/WindowsFormsTestBase.cs (revision 0)
+++ Core/Common/test/Core.Common.TestUtils/WindowsFormsTestBase.cs (revision 482a3c997bd68b3b524639518cb488335caf02e8)
@@ -0,0 +1,15 @@
+using NUnit.Extensions.Forms;
+
+namespace Core.Common.TestUtils
+{
+ public class WindowsFormsTestBase : NUnitFormTest
+ {
+ public override bool UseHidden
+ {
+ get
+ {
+ return false;
+ }
+ }
+ }
+}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs
===================================================================
diff -u -r6fc99be8198e5795ca4be54719dab3d1be3c6299 -r482a3c997bd68b3b524639518cb488335caf02e8
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs (.../FailureMechanismContributionViewTest.cs) (revision 6fc99be8198e5795ca4be54719dab3d1be3c6299)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs (.../FailureMechanismContributionViewTest.cs) (revision 482a3c997bd68b3b524639518cb488335caf02e8)
@@ -12,7 +12,7 @@
namespace Ringtoets.Integration.Forms.Test.Views
{
[TestFixture]
- public class FailureMechanismContributionViewTest : NUnitFormTest
+ public class FailureMechanismContributionViewTest : WindowsFormsTestBase
{
private MockRepository mockRepository;
@@ -22,14 +22,6 @@
mockRepository = new MockRepository();
}
- public override bool UseHidden
- {
- get
- {
- return false;
- }
- }
-
[Test]
public void NormTextBox_Initialize_TextSetToData()
{