You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,15 @@ All notable changes to TestableHttpClient will be documented in this file.
4
4
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
5
5
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
-
## [0.9] - unplanned
7
+
## [0.9] - 2022-11-25
8
8
### Deprecated
9
9
-`Responses.NoContent()` has been deprecated, since it doesn't fit well with the rest of the API. Please use `Responses.StatusCode(HttpStatusCode.NoContent)` instead.
10
10
11
11
### Removed
12
12
- Official support for .NET Core 3.1 has been removed. This means we no longer provide a specific version for .NET Core 3.0 and we no longer test this version explicitly. Since we support .NET Standard 2.0, the library could still be used.
13
13
- TestableHttpClient.NFluent has been moved to it's own repository.
14
+
-`HttpRequestMessageExtensions` have been made internal.
15
+
-`HttpResponseMessageExtensions` have been removed, since it not needed for making HttpClients testable.
14
16
15
17
### Added
16
18
- Added `Responses.Route` that allows changing the response based on the url. The url supports patterns.
@@ -243,6 +245,7 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
243
245
- Automatically build project when pushing changes to github and when creating a pull request
244
246
- Automatically deploy to NuGet when creating a tag in github
Creating unittest for code that uses `HttpClient` can be difficult to test. It requires a custom HttpMessageHandler or a mocked version. TestableHttpClient provides a testable version of HttpMessageHandler and several helper functions to configure the `TestableHttpHandler` and several ways to assert which requests were made.
#pragma warning disable CS0618// Type or member is obsolete
234
223
returncheck.WithFilter(x =>x.HasRequestHeader(headerName,headerValue),expectedNumberOfRequests,$"request header '{headerName}' and value '{headerValue}'");
235
-
#pragma warning restore CS0618// Type or member is obsolete
#pragma warning disable CS0618// Type or member is obsolete
313
298
returncheck.WithFilter(x =>x.HasContentHeader(headerName,headerValue),expectedNumberOfRequests,$"content header '{headerName}' and value '{headerValue}'");
314
-
#pragma warning restore CS0618// Type or member is obsolete
#pragma warning disable CS0618// Type or member is obsolete
388
369
returncheck.WithFilter(x =>x.HasRequestHeader(headerName,headerValue)||x.HasContentHeader(headerName,headerValue),expectedNumberOfRequests,$"header '{headerName}' and value '{headerValue}'");
389
-
#pragma warning restore CS0618// Type or member is obsolete
0 commit comments