Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemTests: add net9 portability test #326

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ In order to run all system tests, you will need to have the following SDKs insta
- .NET 4.8.1 SDK
- .NET 6.0 SDK
- .NET 7.0 SDK
- .NET 8.0 SDK
- .NET 9.0 SDK

and of course **C# knowledge** if you are looking to contribute by coding.

Expand Down
16 changes: 16 additions & 0 deletions Tests/Reqnroll.SystemTests/Portability/Net90PortabilityTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Reqnroll.TestProjectGenerator.Data;

namespace Reqnroll.SystemTests.Portability;

[TestClass]
[TestCategory("DotNet")]
[TestCategory("Net90")]
public class Net90PortabilityTest : PortabilityTestBase
{
protected override void TestInitialize()
{
base.TestInitialize();
_testRunConfiguration.TargetFramework = TargetFramework.Net90;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum TargetFramework
Net50,
Net60,
Net70,
Net80
Net80,
Net90
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class NetCoreSdkInfoProvider
private static readonly NetCoreSdkInfo Net60 = new("6.0.100");
private static readonly NetCoreSdkInfo Net70 = new("7.0.100");
private static readonly NetCoreSdkInfo Net80 = new("8.0.100");
private static readonly NetCoreSdkInfo Net90 = new("9.0.100");

private readonly IReadOnlyDictionary<TargetFramework, NetCoreSdkInfo> _sdkMappings = new Dictionary<TargetFramework, NetCoreSdkInfo>
{
Expand All @@ -28,6 +29,7 @@ public class NetCoreSdkInfoProvider
[TargetFramework.Net60] = Net60,
[TargetFramework.Net70] = Net70,
[TargetFramework.Net80] = Net80,
[TargetFramework.Net90] = Net90,
[TargetFramework.Netcoreapp31] = NetCore31,
[TargetFramework.Netcoreapp30] = NetCore30,
[TargetFramework.Netcoreapp22] = NetCore22,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class TargetFrameworkMonikerStringBuilder
[TargetFramework.Net60] = "net6.0",
[TargetFramework.Net70] = "net7.0",
[TargetFramework.Net80] = "net8.0",
[TargetFramework.Net90] = "net9.0"
};

public string BuildTargetFrameworkMoniker(TargetFramework targetFramework)
Expand Down