From f3e75e629c6ba97bf009656d65661ec3b23e2c59 Mon Sep 17 00:00:00 2001 From: jbe2277 Date: Sat, 4 May 2024 13:25:42 +0200 Subject: [PATCH] UITest: prepare for BookLibrary UI tests --- .../BookLibrary.Test/BookLibrary.Test.csproj | 19 +++++++++++++++++++ src/Samples.UITest/Samples.UITest.sln | 14 +++++++++++++- .../{Writer.Test => UITest.Core}/UIAssert.cs | 2 +- .../UITest.Core/UITest.Core.csproj | 13 +++++++++++++ .../UITestHelper.cs | 2 +- .../Writer.Test/Writer.Test.csproj | 5 ++++- 6 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj rename src/Samples.UITest/{Writer.Test => UITest.Core}/UIAssert.cs (97%) create mode 100644 src/Samples.UITest/UITest.Core/UITest.Core.csproj rename src/Samples.UITest/{Writer.Test => UITest.Core}/UITestHelper.cs (99%) diff --git a/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj new file mode 100644 index 00000000..34c26002 --- /dev/null +++ b/src/Samples.UITest/BookLibrary.Test/BookLibrary.Test.csproj @@ -0,0 +1,19 @@ + + + net8.0-windows + UITest.BookLibrary + + enable + enable + + + + + + + + + + + + diff --git a/src/Samples.UITest/Samples.UITest.sln b/src/Samples.UITest/Samples.UITest.sln index 9d83d639..cb64ab9f 100644 --- a/src/Samples.UITest/Samples.UITest.sln +++ b/src/Samples.UITest/Samples.UITest.sln @@ -3,7 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.9.34714.143 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Writer.Test", "Writer.Test\Writer.Test.csproj", "{8FBAB64A-51F5-40F8-8B56-4AEE7BE49838}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Writer.Test", "Writer.Test\Writer.Test.csproj", "{8FBAB64A-51F5-40F8-8B56-4AEE7BE49838}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookLibrary.Test", "BookLibrary.Test\BookLibrary.Test.csproj", "{A239DB72-F7D9-4DE9-83F9-E0D852FA5F8F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UITest.Core", "UITest.Core\UITest.Core.csproj", "{4B2174D9-B723-42AA-90DA-2F556409F19A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +19,14 @@ Global {8FBAB64A-51F5-40F8-8B56-4AEE7BE49838}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FBAB64A-51F5-40F8-8B56-4AEE7BE49838}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FBAB64A-51F5-40F8-8B56-4AEE7BE49838}.Release|Any CPU.Build.0 = Release|Any CPU + {A239DB72-F7D9-4DE9-83F9-E0D852FA5F8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A239DB72-F7D9-4DE9-83F9-E0D852FA5F8F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A239DB72-F7D9-4DE9-83F9-E0D852FA5F8F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A239DB72-F7D9-4DE9-83F9-E0D852FA5F8F}.Release|Any CPU.Build.0 = Release|Any CPU + {4B2174D9-B723-42AA-90DA-2F556409F19A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B2174D9-B723-42AA-90DA-2F556409F19A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B2174D9-B723-42AA-90DA-2F556409F19A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B2174D9-B723-42AA-90DA-2F556409F19A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Samples.UITest/Writer.Test/UIAssert.cs b/src/Samples.UITest/UITest.Core/UIAssert.cs similarity index 97% rename from src/Samples.UITest/Writer.Test/UIAssert.cs rename to src/Samples.UITest/UITest.Core/UIAssert.cs index 6d739fb9..7281377e 100644 --- a/src/Samples.UITest/Writer.Test/UIAssert.cs +++ b/src/Samples.UITest/UITest.Core/UIAssert.cs @@ -1,7 +1,7 @@ using FlaUI.Core.Tools; using System.Runtime.CompilerServices; -namespace UITest.Writer; +namespace UITest; public class ElementFoundException(string message, Exception? innerException = null) : Exception(message, innerException) { } diff --git a/src/Samples.UITest/UITest.Core/UITest.Core.csproj b/src/Samples.UITest/UITest.Core/UITest.Core.csproj new file mode 100644 index 00000000..87bdf3ab --- /dev/null +++ b/src/Samples.UITest/UITest.Core/UITest.Core.csproj @@ -0,0 +1,13 @@ + + + net8.0-windows + UITest + + enable + enable + + + + + + diff --git a/src/Samples.UITest/Writer.Test/UITestHelper.cs b/src/Samples.UITest/UITest.Core/UITestHelper.cs similarity index 99% rename from src/Samples.UITest/Writer.Test/UITestHelper.cs rename to src/Samples.UITest/UITest.Core/UITestHelper.cs index 479ffb79..c0e06383 100644 --- a/src/Samples.UITest/Writer.Test/UITestHelper.cs +++ b/src/Samples.UITest/UITest.Core/UITestHelper.cs @@ -4,7 +4,7 @@ using FlaUI.Core.Tools; using System.Text; -namespace UITest.Writer; +namespace UITest; public class ElementNotFoundException(string message, Exception? innerException = null) : Exception(message, innerException) { } diff --git a/src/Samples.UITest/Writer.Test/Writer.Test.csproj b/src/Samples.UITest/Writer.Test/Writer.Test.csproj index eb8f2100..18d5c8d0 100644 --- a/src/Samples.UITest/Writer.Test/Writer.Test.csproj +++ b/src/Samples.UITest/Writer.Test/Writer.Test.csproj @@ -8,9 +8,12 @@ - + + + +