Skip to content

Commit

Permalink
SystemTests: add net9 portability test (#326)
Browse files Browse the repository at this point in the history
* SystemTests: add net9 portability test

* Apply suggestions from code review

Co-authored-by: obligaron <[email protected]>

---------

Co-authored-by: obligaron <[email protected]>
  • Loading branch information
chrisbillson and obligaron authored Nov 22, 2024
1 parent 8f62fbc commit 45df08c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
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

0 comments on commit 45df08c

Please sign in to comment.