Skip to content

Commit

Permalink
Add more package tests and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Sep 9, 2024
1 parent d884dd9 commit e3d96c1
Show file tree
Hide file tree
Showing 25 changed files with 416 additions and 260 deletions.
71 changes: 44 additions & 27 deletions NUnitConsole.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
GitReleaseManager.yaml = GitReleaseManager.yaml
GitVersion.yml = GitVersion.yml
global.json = global.json
header-check.cake = header-check.cake
LICENSE.txt = LICENSE.txt
NetFXTests.nunit = NetFXTests.nunit
NOTICES.txt = NOTICES.txt
NuGet.config = NuGet.config
nunit.ico = nunit.ico
package-checks.cake = package-checks.cake
package-tests.cake = package-tests.cake
packages.cake = packages.cake
PLATFORM_SUPPORT.md = PLATFORM_SUPPORT.md
README.md = README.md
test-results.cake = test-results.cake
VERSIONING.md = VERSIONING.md
cake\zip-package.cake = cake\zip-package.cake
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{A972031D-2F61-4183-AF75-99EE1A9F6B32}"
Expand All @@ -47,7 +42,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.engine", "src\NUnitEn
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.engine.tests", "src\NUnitEngine\nunit.engine.tests\nunit.engine.tests.csproj", "{D694CB69-6CFB-4762-86C2-EB27B808B282}"
ProjectSection(ProjectDependencies) = postProject
{B1D90742-39BD-429C-8E87-C5CD2991DF27} = {B1D90742-39BD-429C-8E87-C5CD2991DF27}
{C2A8FC7A-FA64-46EA-AF6D-73D6B371DBF8} = {C2A8FC7A-FA64-46EA-AF6D-73D6B371DBF8}
{0DE218CA-AFB8-423A-9CD2-E22DEAC55C46} = {0DE218CA-AFB8-423A-9CD2-E22DEAC55C46}
EndProjectSection
Expand Down Expand Up @@ -78,10 +72,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "runners", "runners", "{F3E8
nuget\runners\nunit.console.nuget.agent.addins = nuget\runners\nunit.console.nuget.agent.addins
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mock-assembly", "src\NUnitEngine\mock-assembly\mock-assembly.csproj", "{D2C80E4B-1117-4F02-AB02-E453BDA0C58E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "notest-assembly", "src\NUnitEngine\notest-assembly\notest-assembly.csproj", "{B1D90742-39BD-429C-8E87-C5CD2991DF27}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "choco", "choco", "{4FDF7BFA-A337-41D3-898D-C6A98278E6AD}"
ProjectSection(SolutionItems) = preProject
choco\nunit-agent-x86.exe.ignore = choco\nunit-agent-x86.exe.ignore
Expand All @@ -102,8 +92,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.engine.core", "src\NU
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-x86", "src\NUnitEngine\nunit-agent-x86\nunit-agent-x86.csproj", "{333D2FBC-CCA7-46AF-9453-C310671A67B0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mock-assembly-x86", "src\NUnitEngine\mock-assembly-x86\mock-assembly-x86.csproj", "{9D3015EE-5B84-41B3-A1D3-1A439370C392}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deprecated", "deprecated", "{068F6CA9-6108-4F45-8540-351AA5227259}"
ProjectSection(SolutionItems) = preProject
choco\deprecated\nunit-console-with-extensions.nuspec = choco\deprecated\nunit-console-with-extensions.nuspec
Expand Down Expand Up @@ -135,6 +123,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{C5B712
.config\dotnet-tools.json = .config\dotnet-tools.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aspnetcore-test", "src\TestData\aspnetcore-test\aspnetcore-test.csproj", "{DB42594C-9A68-488A-A289-47C0F9E29808}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "windows-forms-test", "src\TestData\windows-forms-test\windows-forms-test.csproj", "{0DF71C73-52A4-4423-8CEC-8A24D4F83FF3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfTest", "src\TestData\wpf-test\WpfTest.csproj", "{A96876EE-1A1F-4096-9B6A-5739E66B3364}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestData", "TestData", "{2ECE1CFB-9436-4149-B7E4-1FB1786FDE9F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mock-assembly", "src\TestData\mock-assembly\mock-assembly.csproj", "{C3FF8716-052B-4D6C-81FF-E80F89AF9A80}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mock-assembly-x86", "src\TestData\mock-assembly-x86\mock-assembly-x86.csproj", "{8FE8378E-5A8B-4708-8F86-35BE0DE121F7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "notest-assembly", "src\TestData\notest-assembly\notest-assembly.csproj", "{81E63A90-3191-4E99-92FF-01F9B1D3E3C5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -165,14 +167,6 @@ Global
{B310A760-8AE1-41CA-81F8-03B12E2FCE30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B310A760-8AE1-41CA-81F8-03B12E2FCE30}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B310A760-8AE1-41CA-81F8-03B12E2FCE30}.Release|Any CPU.Build.0 = Release|Any CPU
{D2C80E4B-1117-4F02-AB02-E453BDA0C58E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2C80E4B-1117-4F02-AB02-E453BDA0C58E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2C80E4B-1117-4F02-AB02-E453BDA0C58E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2C80E4B-1117-4F02-AB02-E453BDA0C58E}.Release|Any CPU.Build.0 = Release|Any CPU
{B1D90742-39BD-429C-8E87-C5CD2991DF27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1D90742-39BD-429C-8E87-C5CD2991DF27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1D90742-39BD-429C-8E87-C5CD2991DF27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1D90742-39BD-429C-8E87-C5CD2991DF27}.Release|Any CPU.Build.0 = Release|Any CPU
{A19C026B-1C0F-4AA3-AC49-7D8B4C7231CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A19C026B-1C0F-4AA3-AC49-7D8B4C7231CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A19C026B-1C0F-4AA3-AC49-7D8B4C7231CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -181,14 +175,34 @@ Global
{333D2FBC-CCA7-46AF-9453-C310671A67B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{333D2FBC-CCA7-46AF-9453-C310671A67B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{333D2FBC-CCA7-46AF-9453-C310671A67B0}.Release|Any CPU.Build.0 = Release|Any CPU
{9D3015EE-5B84-41B3-A1D3-1A439370C392}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D3015EE-5B84-41B3-A1D3-1A439370C392}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D3015EE-5B84-41B3-A1D3-1A439370C392}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D3015EE-5B84-41B3-A1D3-1A439370C392}.Release|Any CPU.Build.0 = Release|Any CPU
{CACC0520-B452-4310-A33C-DC944129ACDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CACC0520-B452-4310-A33C-DC944129ACDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CACC0520-B452-4310-A33C-DC944129ACDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CACC0520-B452-4310-A33C-DC944129ACDD}.Release|Any CPU.Build.0 = Release|Any CPU
{DB42594C-9A68-488A-A289-47C0F9E29808}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB42594C-9A68-488A-A289-47C0F9E29808}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB42594C-9A68-488A-A289-47C0F9E29808}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB42594C-9A68-488A-A289-47C0F9E29808}.Release|Any CPU.Build.0 = Release|Any CPU
{0DF71C73-52A4-4423-8CEC-8A24D4F83FF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DF71C73-52A4-4423-8CEC-8A24D4F83FF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DF71C73-52A4-4423-8CEC-8A24D4F83FF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DF71C73-52A4-4423-8CEC-8A24D4F83FF3}.Release|Any CPU.Build.0 = Release|Any CPU
{A96876EE-1A1F-4096-9B6A-5739E66B3364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A96876EE-1A1F-4096-9B6A-5739E66B3364}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A96876EE-1A1F-4096-9B6A-5739E66B3364}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A96876EE-1A1F-4096-9B6A-5739E66B3364}.Release|Any CPU.Build.0 = Release|Any CPU
{C3FF8716-052B-4D6C-81FF-E80F89AF9A80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3FF8716-052B-4D6C-81FF-E80F89AF9A80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3FF8716-052B-4D6C-81FF-E80F89AF9A80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3FF8716-052B-4D6C-81FF-E80F89AF9A80}.Release|Any CPU.Build.0 = Release|Any CPU
{8FE8378E-5A8B-4708-8F86-35BE0DE121F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FE8378E-5A8B-4708-8F86-35BE0DE121F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FE8378E-5A8B-4708-8F86-35BE0DE121F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FE8378E-5A8B-4708-8F86-35BE0DE121F7}.Release|Any CPU.Build.0 = Release|Any CPU
{81E63A90-3191-4E99-92FF-01F9B1D3E3C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81E63A90-3191-4E99-92FF-01F9B1D3E3C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81E63A90-3191-4E99-92FF-01F9B1D3E3C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81E63A90-3191-4E99-92FF-01F9B1D3E3C5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -203,20 +217,23 @@ Global
{B310A760-8AE1-41CA-81F8-03B12E2FCE30} = {576DB1E6-C5EC-4FEF-A826-EC19D8BEE572}
{43A219A8-2995-4884-806F-FDB9CD25D403} = {A972031D-2F61-4183-AF75-99EE1A9F6B32}
{F3E87D0F-6F06-4C0B-AE06-42C0834C3C6E} = {A972031D-2F61-4183-AF75-99EE1A9F6B32}
{D2C80E4B-1117-4F02-AB02-E453BDA0C58E} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{B1D90742-39BD-429C-8E87-C5CD2991DF27} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{4FDF7BFA-A337-41D3-898D-C6A98278E6AD} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{9A7C8370-ED1F-486F-A8F5-C5BF4221464E} = {A972031D-2F61-4183-AF75-99EE1A9F6B32}
{A19C026B-1C0F-4AA3-AC49-7D8B4C7231CF} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{333D2FBC-CCA7-46AF-9453-C310671A67B0} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{9D3015EE-5B84-41B3-A1D3-1A439370C392} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{068F6CA9-6108-4F45-8540-351AA5227259} = {4FDF7BFA-A337-41D3-898D-C6A98278E6AD}
{20005864-BE82-412D-99BF-288E2D8370E9} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{CACC0520-B452-4310-A33C-DC944129ACDD} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{25DA12FE-6209-4524-9A37-8E51F815E198} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{08F8160E-E691-4F07-9F57-EA31B9736429} = {25DA12FE-6209-4524-9A37-8E51F815E198}
{50371E48-BEC3-4D53-BD37-F3A6149CFD0D} = {25DA12FE-6209-4524-9A37-8E51F815E198}
{C5B7120C-190B-4C38-95CB-83F12799598D} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{DB42594C-9A68-488A-A289-47C0F9E29808} = {2ECE1CFB-9436-4149-B7E4-1FB1786FDE9F}
{0DF71C73-52A4-4423-8CEC-8A24D4F83FF3} = {2ECE1CFB-9436-4149-B7E4-1FB1786FDE9F}
{A96876EE-1A1F-4096-9B6A-5739E66B3364} = {2ECE1CFB-9436-4149-B7E4-1FB1786FDE9F}
{C3FF8716-052B-4D6C-81FF-E80F89AF9A80} = {2ECE1CFB-9436-4149-B7E4-1FB1786FDE9F}
{8FE8378E-5A8B-4708-8F86-35BE0DE121F7} = {2ECE1CFB-9436-4149-B7E4-1FB1786FDE9F}
{81E63A90-3191-4E99-92FF-01F9B1D3E3C5} = {2ECE1CFB-9436-4149-B7E4-1FB1786FDE9F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D8E4FC26-5422-4C51-8BBC-D1AC0A578711}
Expand Down
229 changes: 2 additions & 227 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Comment out above line and uncomment below for local tests of recipe changes
//#load ../NUnit.Cake.Recipe/recipe/*.cake

#load package-tests.cake

// Initialize BuildSettings
BuildSettings.Initialize(
Context,
Expand All @@ -12,233 +14,6 @@ BuildSettings.Initialize(
exemptFiles: new[] { "Options.cs", "ProcessUtils.cs", "ProcessUtilsTests.cs" },
unitTests: "**/*.tests.exe");

//////////////////////////////////////////////////////////////////////
// PACKAGE TEST LISTS
//////////////////////////////////////////////////////////////////////

// Tests run for all runner packages except NETCORE runner
var StandardRunnerTests = new List<PackageTest>
{
Net462Test,
Net462X86Test,
Net462PlusNet462Test,
Net462ExeTest,
NetCore31Test,
Net60Test,
Net70Test,
Net80Test,
Net60PlusNet80Test,
Net462PlusNet60Test,
NUnitProjectTest,
V2ResultWriterTest,
VSProjectLoaderTest_Project,
VSProjectLoaderTest_Solution
};

// Tests run for the NETCORE runner package
var NetCoreRunnerTests = new List<PackageTest>
{
NetCore31Test,
Net60Test,
Net70Test,
Net80Test,
};

const string DOTNET_EXE_X86 = @"C:\Program Files (x86)\dotnet\dotnet.exe";
// TODO: Remove the limitation to Windows
bool dotnetX86Available = IsRunningOnWindows() && System.IO.File.Exists(DOTNET_EXE_X86);

if (dotnetX86Available)
{
bool onAppVeyor = BuildSystem.IsRunningOnAppVeyor;
bool onGitHubActions = BuildSystem.IsRunningOnGitHubActions;

StandardRunnerTests.Add(Net60X86Test);
// TODO: Make these tests run on AppVeyor and GitHub Actions
if (!onAppVeyor && !onGitHubActions)
StandardRunnerTests.Add(NetCore31X86Test);
if (!onAppVeyor && !onGitHubActions)
StandardRunnerTests.Add(Net70X86Test);
if (!onAppVeyor)
StandardRunnerTests.Add(Net80X86Test);
// Currently, NetCoreRunner runs tests in process. As a result,
// X86 tests will not work in our environment, although uses may run
// it as a tool using the X86 architecture.
}

//////////////////////////////////////////////////////////////////////
// INDIVIDUAL PACKAGE TEST DEFINITIONS
//////////////////////////////////////////////////////////////////////

static ExpectedResult MockAssemblyExpectedResult(int nCopies = 1) => new ExpectedResult("Failed")
{
Total = 37 * nCopies,
Passed = 23 * nCopies,
Failed = 5 * nCopies,
Warnings = 1 * nCopies,
Inconclusive = 1 * nCopies,
Skipped = 7 * nCopies
};

static ExpectedResult MockAssemblyExpectedResult(params string[] runtimes)
{
int nCopies = runtimes.Length;
var result = MockAssemblyExpectedResult(nCopies);
result.Assemblies = new ExpectedAssemblyResult[nCopies];
for (int i = 0; i < nCopies; i++)
result.Assemblies[i] = new ExpectedAssemblyResult("mock-assembly.dll", runtimes[i]);
return result;
}

static ExpectedResult MockAssemblyX86ExpectedResult(params string[] runtimes)
{
int nCopies = runtimes.Length;
var result = MockAssemblyExpectedResult(nCopies);
result.Assemblies = new ExpectedAssemblyResult[nCopies];
for (int i = 0; i < nCopies; i++)
result.Assemblies[i] = new ExpectedAssemblyResult("mock-assembly-x86.dll", runtimes[i]);
return result;
}

static ExpectedResult MockAssemblySolutionResult = new ExpectedResult("Failed")
{
Total = 37 * 5,
Passed = 23 * 5,
Failed = 5 * 5,
Warnings = 1 * 5,
Inconclusive = 1 * 5,
Skipped = 7 * 5,
Assemblies = new ExpectedAssemblyResult[]
{
new ExpectedAssemblyResult("mock-assembly.dll", "net-4.6.2"),
new ExpectedAssemblyResult("mock-assembly.dll", "netcore-3.1"),
new ExpectedAssemblyResult("mock-assembly.dll", "netcore-6.0"),
new ExpectedAssemblyResult("mock-assembly.dll", "netcore-7.0"),
new ExpectedAssemblyResult("mock-assembly.dll", "netcore-8.0"),
new ExpectedAssemblyResult("notest-assembly.dll", "net-4.6.2"),
new ExpectedAssemblyResult("notest-assembly.dll", "netcore-3.1"),
new ExpectedAssemblyResult("notest-assembly.dll", "netstandard-2.0")
}
};

static PackageTest Net462Test = new PackageTest(
1, "Net462Test",
"Run mock-assembly.dll under .NET 4.6.2",
"net462/mock-assembly.dll",
MockAssemblyExpectedResult("net-4.6.2"));

static PackageTest Net462X86Test = new PackageTest(
1, "Net462X86Test",
"Run mock-assembly-x86.dll under .NET 4.6.2",
"net462/mock-assembly-x86.dll",
MockAssemblyX86ExpectedResult("net-4.6.2"));

static PackageTest Net462ExeTest = new PackageTest(
1, "Net462ExeTest",
"Run nunit.engine.core.tests.exe under .NET 4.6.2",
"net462/nunit.engine.core.tests.exe",
new ExpectedResult("Passed") { Assemblies = new[] { new ExpectedAssemblyResult("nunit.engine.core.tests.exe")}});

static PackageTest Net462PlusNet462Test = new PackageTest(
1, "Net462PlusNet462Test",
"Run two copies of mock-assembly together",
"net462/mock-assembly.dll net462/mock-assembly.dll",
MockAssemblyExpectedResult("net-4.6.2", "net-4.6.2"));

static PackageTest Net80Test = new PackageTest(
1, "Net80Test",
"Run mock-assembly.dll under .NET 8.0",
"net8.0/mock-assembly.dll",
MockAssemblyExpectedResult("netcore-8.0"));

static PackageTest Net80X86Test = new PackageTest(
1, "Net80X86Test",
"Run mock-assembly-x86.dll under .NET 8.0",
"net8.0/mock-assembly-x86.dll",
MockAssemblyX86ExpectedResult("netcore-8.0"));

static PackageTest Net70Test = new PackageTest(
1, "Net70Test",
"Run mock-assembly.dll under .NET 7.0",
"net7.0/mock-assembly.dll",
MockAssemblyExpectedResult("netcore-7.0"));

static PackageTest Net70X86Test = new PackageTest(
1, "Net70X86Test",
"Run mock-assembly-x86.dll under .NET 7.0",
"net7.0/mock-assembly-x86.dll",
MockAssemblyX86ExpectedResult("netcore-7.0"));

static PackageTest Net60Test = new PackageTest(
1, "Net60Test",
"Run mock-assembly.dll under .NET 6.0",
"net6.0/mock-assembly.dll",
MockAssemblyExpectedResult("netcore-6.0"));

static PackageTest Net60X86Test = new PackageTest(
1, "Net60X86Test",
"Run mock-assembly-x86.dll under .NET 6.0",
"net6.0/mock-assembly-x86.dll",
MockAssemblyX86ExpectedResult("netcore-6.0"));

static PackageTest NetCore31Test = new PackageTest(
1, "NetCore31Test",
"Run mock-assembly.dll under .NET Core 3.1",
"netcoreapp3.1/mock-assembly.dll",
MockAssemblyExpectedResult("netcore-3.1"));

static PackageTest NetCore31X86Test = new PackageTest(
1, "NetCore31X86Test",
"Run mock-assembly-x86.dll under .NET Core 3.1",
"netcoreapp3.1/mock-assembly-x86.dll",
MockAssemblyX86ExpectedResult("netcore-3.1"));

static PackageTest Net60PlusNet80Test = new PackageTest(
1, "Net60PlusNet80Test",
"Run mock-assembly under .NET6.0 and 8.0 together",
"net6.0/mock-assembly.dll net8.0/mock-assembly.dll",
MockAssemblyExpectedResult("netcore-6.0", "netcore-8.0"));

static PackageTest Net462PlusNet60Test = new PackageTest(
1, "Net462PlusNet60Test",
"Run mock-assembly under .Net Framework 4.6.2 and .Net 6.0 together",
"net462/mock-assembly.dll net6.0/mock-assembly.dll",
MockAssemblyExpectedResult("net-4.6.2", "netcore-6.0"));

// Test with latest released version of each of our extensions

static ExtensionSpecifier NUnitProjectLoader = KnownExtensions.NUnitProjectLoader.SetVersion("3.8.0");
static ExtensionSpecifier NUnitV2ResultWriter = KnownExtensions.NUnitV2ResultWriter.SetVersion("3.8.0");
static ExtensionSpecifier VSProjectLoader = KnownExtensions.VSProjectLoader.SetVersion("3.9.0");

static PackageTest NUnitProjectTest = new PackageTest(
1, "NUnitProjectTest",
"Run project with both copies of mock-assembly",
"../../NetFXTests.nunit --config=Release --trace=Debug",
MockAssemblyExpectedResult("net-4.6.2", "netcore-6.0"),
NUnitProjectLoader);

static PackageTest V2ResultWriterTest = new PackageTest(
1, "V2ResultWriterTest",
"Run mock-assembly under .NET 6.0 and produce V2 output",
"net6.0/mock-assembly.dll --result=TestResult.xml --result=NUnit2TestResult.xml;format=nunit2",
MockAssemblyExpectedResult("netcore-6.0"),
NUnitV2ResultWriter);

static PackageTest VSProjectLoaderTest_Project = new PackageTest(
1, "VSProjectLoaderTest_Project",
"Run mock-assembly using the .csproj file",
"../../src/NUnitEngine/mock-assembly/mock-assembly.csproj --config=Release",
MockAssemblyExpectedResult("net462", "netcore-3.1", "netcore-6.0", "netcore-7.0", "netcore-8.0"),
VSProjectLoader);

static PackageTest VSProjectLoaderTest_Solution = new PackageTest(
1, "VSProjectLoaderTest_Solution",
"Run mock-assembly using the .sln file",
"../../src/NUnitEngine/mock-assembly/mock-assembly.sln --config=Release",
MockAssemblySolutionResult,
VSProjectLoader);

//////////////////////////////////////////////////////////////////////
// LISTS OF FILES USED IN CHECKING PACKAGES
//////////////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit e3d96c1

Please sign in to comment.