From 37039939c507321440d4acc9c8230ca83e694d35 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Sun, 1 Dec 2024 03:46:48 -0800 Subject: [PATCH] Add tests to show that the .NET Core runner can load compatible extensions --- NetFXTests.nunit => MixedTests.nunit | 0 NUnitConsole.sln | 3 ++- NetCoreTests.nunit | 11 +++++++++++ package-tests.cake | 13 ++++++++++--- 4 files changed, 23 insertions(+), 4 deletions(-) rename NetFXTests.nunit => MixedTests.nunit (100%) create mode 100644 NetCoreTests.nunit diff --git a/NetFXTests.nunit b/MixedTests.nunit similarity index 100% rename from NetFXTests.nunit rename to MixedTests.nunit diff --git a/NUnitConsole.sln b/NUnitConsole.sln index 8702696b9..5150d355e 100644 --- a/NUnitConsole.sln +++ b/NUnitConsole.sln @@ -22,7 +22,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution GitVersion.yml = GitVersion.yml global.json = global.json LICENSE.txt = LICENSE.txt - NetFXTests.nunit = NetFXTests.nunit + NetCoreTests.nunit = NetCoreTests.nunit + MixedTests.nunit = MixedTests.nunit NOTICES.txt = NOTICES.txt NuGet.config = NuGet.config nunit.ico = nunit.ico diff --git a/NetCoreTests.nunit b/NetCoreTests.nunit new file mode 100644 index 000000000..093078013 --- /dev/null +++ b/NetCoreTests.nunit @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/package-tests.cake b/package-tests.cake index eab3b20c9..0f371e852 100644 --- a/package-tests.cake +++ b/package-tests.cake @@ -201,12 +201,19 @@ AddToBothLists(new PackageTest( // RUN TESTS USING EACH OF OUR EXTENSIONS ////////////////////////////////////////////////////////////////////// -// NUnit Project Loader Test +// NUnit Project Loader Tests StandardRunnerTests.Add(new PackageTest( 1, "NUnitProjectTest", "Run NUnit project with mock-assembly.dll built for .NET 4.6.2 and 6.0", - "../../NetFXTests.nunit --config=Release --trace=Debug", - new MockAssemblyExpectedResult("net-4.6.2", "netcore-6.0"), + "../../MixedTests.nunit --config=Release", + new MockAssemblyExpectedResult("net-4.6.2", "net-6.0"), + KnownExtensions.NUnitProjectLoader)); + +NetCoreRunnerTests.Add(new PackageTest( + 1, "NUnitProjectTest", + "Run NUnit project with mock-assembly.dll built for .NET 6.0 and 8.0", + "../../NetCoreTests.nunit --config=Release", + new MockAssemblyExpectedResult("netcore-6.0", "netcore-8.0"), KnownExtensions.NUnitProjectLoader)); // V2 Result Writer Test