Skip to content

Commit 97d8a84

Browse files
authored
Prepare for version 0.11 (#262)
* Update nuget packages * Remove .NET 7 support * bump version * Add nbgv tool to fix build. * Replace sonar.login with sonar.token * Fix some sonarqube warnings * Update PublicAPI.Shipped.txt * Update changelog
1 parent 7632ec0 commit 97d8a84

File tree

12 files changed

+36
-40
lines changed

12 files changed

+36
-40
lines changed

.config/dotnet-tools.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
"isRoot": true,
44
"tools": {
55
"dotnet-sonarscanner": {
6-
"version": "6.0.0",
6+
"version": "6.2.0",
77
"commands": [
88
"dotnet-sonarscanner"
9-
]
9+
],
10+
"rollForward": false
11+
},
12+
"nbgv": {
13+
"version": "3.6.139",
14+
"commands": [
15+
"nbgv"
16+
],
17+
"rollForward": false
1018
}
1119
}
1220
}

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
with:
2828
dotnet-version: |
2929
6.0.x
30-
7.0.x
3130
8.0.x
3231
include-prerelease: true
3332
- name: Dump .NET info
@@ -38,7 +37,7 @@ jobs:
3837
if: ${{ github.actor != 'dependabot[bot]' }}
3938
env:
4039
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
41-
run: dotnet sonarscanner begin -d:sonar.host.url=https://sonarcloud.io -organization:testablehttpclient -key:testablehttpclient_TestableHttpClient -version:`dotnet nbgv get-version --variable NuGetPackageVersion` -d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml -d:sonar.login=${{env.SONAR_TOKEN}}
40+
run: dotnet sonarscanner begin -d:sonar.host.url=https://sonarcloud.io -organization:testablehttpclient -key:testablehttpclient_TestableHttpClient -version:`dotnet nbgv get-version --variable NuGetPackageVersion` -d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml -d:sonar.token=${{env.SONAR_TOKEN}}
4241
- name: Restore dependencies
4342
run: dotnet restore
4443
- name: Build source code
@@ -50,7 +49,7 @@ jobs:
5049
env:
5150
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5251
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
53-
run: dotnet sonarscanner end -d:sonar.login=${{env.SONAR_TOKEN}}
52+
run: dotnet sonarscanner end -d:sonar.token=${{env.SONAR_TOKEN}}
5453
- name: Check source file format
5554
run: dotnet format --no-restore --verify-no-changes
5655
- name: Pack
@@ -79,7 +78,6 @@ jobs:
7978
with:
8079
dotnet-version: |
8180
6.0.x
82-
7.0.x
8381
8.0.x
8482
include-prerelease: true
8583
- name: Dump .NET info

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ All notable changes to TestableHttpClient will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
55
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [0.11] - Unplanned
7+
## [0.11] - 2024-06-14
88
### Removed
9+
- .NET 7.0 target, since it is no longer supported
910
- `ShouldHaveMadeRequestsTo(this TestableHttpMessageHandler, string, bool)` and `ShouldHaveMadeRequestsTo(this TestableHttpMessageHandler, string, bool, int)` have been removed. CaseInsensitivity is controlled by the `UriPatternMatchingOptions` that can be set on the `TestableHttpMessageHandler`.
1011
- `WithRequestUri(this IHttpRequestMessagesCheck, string, bool)` and `WithRequestUri(this IHttpRequestMessagesCheck, string, bool, int)` have been removed. CaseInsensitivity is controlled by the `UriPatternMatchingOptions` that can be set on the `TestableHttpMessageHandler`.
1112
- `WithQueryString` has been removed, since `ShouldHaveMadeRequestTo` and `WithRequestUri` now properly support querystrings.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ The following versions are being actively tested and thus supported:
8383

8484
- .NET Framework 4.6, 4.7 and 4.8
8585
- .NET 6.0
86-
- .NET 7.0
8786
- .NET 8.0
8887

8988
These versions are supported as long as Microsoft supports them, we do our best to test and support newer versions as soon as possible.

src/TestableHttpClient/PublicAPI.Shipped.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ TestableHttpClient.RoutingOptions.SchemeCaseInsensitive.set -> void
2525
TestableHttpClient.UriPatternMatchingOptions
2626
TestableHttpClient.UriPatternMatchingOptions.DefaultQueryFormat.get -> System.UriFormat
2727
TestableHttpClient.UriPatternMatchingOptions.DefaultQueryFormat.set -> void
28+
TestableHttpClient.UriPatternMatchingOptions.HostCaseInsensitive.get -> bool
29+
TestableHttpClient.UriPatternMatchingOptions.HostCaseInsensitive.set -> void
30+
TestableHttpClient.UriPatternMatchingOptions.PathCaseInsensitive.get -> bool
31+
TestableHttpClient.UriPatternMatchingOptions.PathCaseInsensitive.set -> void
2832
TestableHttpClient.UriPatternMatchingOptions.QueryCaseInsensitive.get -> bool
2933
TestableHttpClient.UriPatternMatchingOptions.QueryCaseInsensitive.set -> void
34+
TestableHttpClient.UriPatternMatchingOptions.SchemeCaseInsensitive.get -> bool
35+
TestableHttpClient.UriPatternMatchingOptions.SchemeCaseInsensitive.set -> void
3036
TestableHttpClient.UriPatternMatchingOptions.UriPatternMatchingOptions() -> void
3137

3238
TestableHttpClient.IRoutingResponseBuilder
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
TestableHttpClient.UriPatternMatchingOptions.HostCaseInsensitive.get -> bool
2-
TestableHttpClient.UriPatternMatchingOptions.HostCaseInsensitive.set -> void
3-
TestableHttpClient.UriPatternMatchingOptions.PathCaseInsensitive.get -> bool
4-
TestableHttpClient.UriPatternMatchingOptions.PathCaseInsensitive.set -> void
5-
TestableHttpClient.UriPatternMatchingOptions.SchemeCaseInsensitive.get -> bool
6-
TestableHttpClient.UriPatternMatchingOptions.SchemeCaseInsensitive.set -> void
1+


src/TestableHttpClient/TestableHttpClient.csproj

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -35,24 +35,19 @@
3535
<PackageReference Include="System.Net.Http" Version="4.3.4" />
3636
<PackageReference Include="System.Text.Json" Version="4.6.0" />
3737
<PackageReference Include="Perfors.UnreachableException" Version="1.0.0" />
38-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
3938
<PackageReference Include="PolyKit.Embedded" Version="3.0.9" />
4039
</ItemGroup>
4140

4241
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
4342
<PackageReference Include="Perfors.UnreachableException" Version="1.0.0" />
44-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
45-
</ItemGroup>
46-
47-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
48-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
4943
</ItemGroup>
5044

5145
<ItemGroup>
46+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
5247
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" PrivateAssets="All">
5348
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5449
</PackageReference>
55-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="All" />
50+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.139" PrivateAssets="All" />
5651
</ItemGroup>
5752

5853
<ItemGroup>

src/TestableHttpClient/Utils/Value.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ internal abstract record Value
1212
}
1313

1414
[DebuggerDisplay("Any value")]
15-
file record AnyValue : Value
15+
file sealed record AnyValue : Value
1616
{
1717
internal override bool Matches(string value, bool ignoreCase) => true;
1818
}
1919

2020
[DebuggerDisplay("Exact value: {expectedValue}")]
21-
file record ExactValue : Value
21+
file sealed record ExactValue : Value
2222
{
2323
private readonly string expectedValue;
2424
public ExactValue(string expectedValue) => this.expectedValue = expectedValue;
2525
internal override bool Matches(string value, bool ignoreCase) => expectedValue.Equals(value, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
2626
}
2727

2828
[DebuggerDisplay("Pattern value: {pattern}")]
29-
file record PatternValue : Value
29+
file sealed record PatternValue : Value
3030
{
3131
private readonly string pattern;
3232
public PatternValue(string pattern) => this.pattern = pattern;

test/Directory.Build.targets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project>
22
<ItemGroup>
3-
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.8.0" />
4-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
5-
<PackageReference Include="xunit" Version="2.6.2" />
6-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
3+
<!-- <PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.8.0" /> -->
4+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
5+
<PackageReference Include="xunit" Version="2.8.1" />
6+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
77
<PrivateAssets>all</PrivateAssets>
88
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
99
</PackageReference>
10-
<PackageReference Include="coverlet.collector" Version="6.0.0">
10+
<PackageReference Include="coverlet.collector" Version="6.0.2">
1111
<PrivateAssets>all</PrivateAssets>
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
</PackageReference>

test/TestableHttpClient.IntegrationTests/TestableHttpClient.IntegrationTests.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net462;net47;net48;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net462;net47;net48;net6.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
@@ -14,12 +14,6 @@
1414
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="[6.0.*,7.0.0)" />
1515
</ItemGroup>
1616

17-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
18-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[7.0.*,8.0.0)" />
19-
<PackageReference Include="Microsoft.Extensions.Http" Version="[7.0.*,8.0.0)" />
20-
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="[7.0.*,8.0.0)" />
21-
</ItemGroup>
22-
2317
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2418
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.*,)" />
2519
<PackageReference Include="Microsoft.Extensions.Http" Version="[8.0.*,)" />

0 commit comments

Comments
 (0)