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

feat(net8): add .NET 8 target framework #86

Merged
merged 1 commit into from
Nov 18, 2023
Merged
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: 1 addition & 1 deletion src/MockHttp.Json/MockHttp.Json.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;netstandard2.1;netstandard2.0;net48;net472;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.1;netstandard2.0;net48;net472;net462</TargetFrameworks>
<PackageId>skwas.MockHttp.Json</PackageId>
<AssemblyName>skwas.MockHttp.Json</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/MockHttp.Server/MockHttp.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<PackageId>skwas.MockHttp.Server</PackageId>
<AssemblyName>skwas.MockHttp.Server</AssemblyName>
<RootNamespace>MockHttp</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion src/MockHttp/MockHttp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;netstandard2.1;netstandard2.0;net48;net472;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.1;netstandard2.0;net48;net472;net462</TargetFrameworks>
<PackageId>skwas.MockHttp</PackageId>
<AssemblyName>skwas.MockHttp</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/MockHttp.Json.Tests/MockHttp.Json.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;net48;net472;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;net48;net472;net462</TargetFrameworks>

<IsTestProject>true</IsTestProject>

Expand Down
7 changes: 4 additions & 3 deletions test/MockHttp.Server.Tests/MockHttp.Server.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netcoreapp3.1</TargetFrameworks>

<IsTestProject>true</IsTestProject>

<RootNamespace>MockHttp</RootNamespace>
<SerilogExtensionsLoggingVersion>7.0.0</SerilogExtensionsLoggingVersion>
<SerilogExtensionsLoggingVersion>8.0.0</SerilogExtensionsLoggingVersion>
<SerilogExtensionsLoggingVersion Condition="$(TargetFramework)=='net7.0'">7.0.0</SerilogExtensionsLoggingVersion>
<SerilogExtensionsLoggingVersion Condition="$(TargetFramework)=='net6.0' Or $(TargetFramework)=='netcoreapp3.1'">3.1.0</SerilogExtensionsLoggingVersion>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions test/MockHttp.Testing/MockHttp.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;net48;net472;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;net48;net472;net462</TargetFrameworks>

<IsTestProject>false</IsTestProject>

Expand Down
8 changes: 8 additions & 0 deletions test/MockHttp.Tests/Http/HttpHeadersCollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,17 @@ public void Given_single_header_string_when_parsing_should_return_key_with_one_o

[Theory]
[InlineData("no-separator", "The value cannot be null or empty.*")]
#if NET8_0_OR_GREATER
[InlineData(":value", "The value cannot be an empty string or composed entirely of whitespace.*")]
#else
[InlineData(":value", "The value cannot be null or empty.*")]
#endif
#if NET7_0_OR_GREATER
#if NET8_0_OR_GREATER
[InlineData(" :value", "The value cannot be an empty string or composed entirely of whitespace.*")]
#else
[InlineData(" :value", "The header name ' ' has an invalid format.")]
#endif
[InlineData(" leading-whitespace-not-allowed:value", "The header name ' leading-whitespace-not-allowed' has an invalid format.")]
[InlineData("\tleading-whitespace-not-allowed:value", "The header name '\tleading-whitespace-not-allowed' has an invalid format.")]
[InlineData("trailing-whitespace-not-allowed :value", "The header name 'trailing-whitespace-not-allowed ' has an invalid format.")]
Expand Down
2 changes: 1 addition & 1 deletion test/MockHttp.Tests/MockHttp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;net48;net472;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp2.1;net48;net472;net462</TargetFrameworks>

<IsTestProject>true</IsTestProject>

Expand Down
Loading