Index: Core/Gui/test/Core.Gui.Integration.Test/Core.Gui.Integration.Test.csproj
===================================================================
diff -u
--- Core/Gui/test/Core.Gui.Integration.Test/Core.Gui.Integration.Test.csproj (revision 0)
+++ Core/Gui/test/Core.Gui.Integration.Test/Core.Gui.Integration.Test.csproj (revision 36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6)
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copying.Lesser.licenseheader
+
+
+
+
+ 2.4.4
+
+
+ 3.8.1
+
+
+ 3.6.1
+
+
+
\ No newline at end of file
Index: Core/Gui/test/Core.Gui.Integration.Test/GuiCoreIntegrationTest.cs
===================================================================
diff -u
--- Core/Gui/test/Core.Gui.Integration.Test/GuiCoreIntegrationTest.cs (revision 0)
+++ Core/Gui/test/Core.Gui.Integration.Test/GuiCoreIntegrationTest.cs (revision 36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6)
@@ -0,0 +1,109 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Threading;
+using System.Windows.Controls;
+using System.Windows.Threading;
+using Core.Common.Base.Data;
+using Core.Common.Base.Storage;
+using Core.Common.TestUtil;
+using Core.Gui.Forms.MainWindow;
+using Core.Gui.Settings;
+using Core.Gui.TestUtil;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Riskeer.Integration.Data;
+using Riskeer.Integration.Plugin;
+
+namespace Core.Gui.Integration.Test
+{
+ [TestFixture]
+ public class GuiCoreIntegrationTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ LogHelper.ResetLogging();
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ Dispatcher.CurrentDispatcher.InvokeShutdown();
+ }
+
+ [Test]
+ [Apartment(ApartmentState.STA)]
+ public void Run_StartWithCommonPlugins_RunsFasterThanThreshold()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var projectStore = mocks.Stub();
+ var projectMigrator = mocks.Stub();
+ var projectFactory = mocks.Stub();
+ projectFactory.Stub(pf => pf.CreateNewProject()).Return(new RiskeerProject());
+ mocks.ReplayAll();
+
+ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
+ {
+ gui.Plugins.Add(new RiskeerPlugin());
+
+ // Call
+ void Action()
+ {
+ gui.Run();
+ WpfTestHelper.ShowModal((Control) gui.MainWindow);
+ }
+
+ // Assert
+ TestHelper.AssertIsFasterThan(7500, Action);
+ }
+
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ [Apartment(ApartmentState.STA)]
+ public void FormActionIsRunForMainWindow()
+ {
+ //testing testhelper + visible changed event of mainwindow.
+ //could be tested separately but the combination is vital to many tests. That's why this test is here.
+ var mocks = new MockRepository();
+ var projectStore = mocks.Stub();
+ var projectMigrator = mocks.Stub();
+ var projectFactory = mocks.Stub();
+ projectFactory.Stub(pf => pf.CreateNewProject()).Return(mocks.Stub());
+ mocks.ReplayAll();
+
+ using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
+ {
+ gui.Plugins.Add(new TestPlugin());
+ gui.Run();
+
+ var callCount = 0;
+ WpfTestHelper.ShowModal((Control) gui.MainWindow, () => callCount++);
+ Assert.AreEqual(1, callCount);
+ }
+
+ mocks.VerifyAll();
+ }
+ }
+}
\ No newline at end of file
Index: Core/Gui/test/Core.Gui.Integration.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u
--- Core/Gui/test/Core.Gui.Integration.Test/Properties/AssemblyInfo.cs (revision 0)
+++ Core/Gui/test/Core.Gui.Integration.Test/Properties/AssemblyInfo.cs (revision 36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6)
@@ -0,0 +1,25 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Reflection;
+
+[assembly: AssemblyTitle("Core.Gui.Integration.Test")]
+[assembly: AssemblyProduct("Core.Gui.Integration.Test")]
\ No newline at end of file
Fisheye: Tag 36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6 refers to a dead (removed) revision in file `Core/Gui/test/Core.Integration.Test/Core.Common.Integration.Test.csproj'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6 refers to a dead (removed) revision in file `Core/Gui/test/Core.Integration.Test/Properties/AssemblyInfo.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6 refers to a dead (removed) revision in file `Core/Gui/test/Core.Integration.Test/Riskeer/Application.Riskeer/GuiCoreIntegrationTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer.sln
===================================================================
diff -u -rde83556154a382cf617783426d7c36ebfa91698a -r36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6
--- Riskeer.sln (.../Riskeer.sln) (revision de83556154a382cf617783426d7c36ebfa91698a)
+++ Riskeer.sln (.../Riskeer.sln) (revision 36bc7bc4c51a39b9d51d8cf79532cf9c63221dc6)
@@ -1768,6 +1768,11 @@
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Gui.Integration.Test", "Core\Gui\test\Core.Gui.Integration.Test\Core.Gui.Integration.Test.csproj", "{D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
@@ -3590,6 +3595,12 @@
{073EE964-974D-442E-801F-F4FCD6D303F5}.Release|x86.Build.0 = Release|x86
{073EE964-974D-442E-801F-F4FCD6D303F5}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86
{073EE964-974D-442E-801F-F4FCD6D303F5}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86
+ {D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5}.Debug|x86.ActiveCfg = Debug|x86
+ {D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5}.Debug|x86.Build.0 = Debug|x86
+ {D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5}.Release|x86.ActiveCfg = Release|x86
+ {D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5}.Release|x86.Build.0 = Release|x86
+ {D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86
+ {D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -3973,6 +3984,7 @@
{FE63A65E-C5AF-456D-A786-912F9B7E26A1} = {8BE49C65-DD09-4890-82B1-5216BF13E757}
{D0C7032E-5730-46D1-A06F-7C4F06BA590A} = {F73AF5D7-DDD9-4A48-A171-037817B59056}
{073EE964-974D-442E-801F-F4FCD6D303F5} = {F73AF5D7-DDD9-4A48-A171-037817B59056}
+ {D4EB99AE-2B05-4CDE-ABF8-1DBCD30F2DC5} = {F73AF5D7-DDD9-4A48-A171-037817B59056}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {039D31AA-B517-4354-B8CD-0B2B826D0B1F}