Skip to content

Commit 1942bcd

Browse files
authored
Rename from HttpClientTestHelpers to TestableHttpClient
Closes #15
1 parent 8097751 commit 1942bcd

23 files changed

+32
-43
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# httpclienttesthelpers
1+
# TestableHttpClient
22

33
Using HttpClient in code that is unit tested is seen as rather difficult, this library aims to make it easier to assert the calls that are made via an HttpClient.
44

@@ -7,7 +7,7 @@ Using HttpClient in code that is unit tested is seen as rather difficult, this l
77
This library is released as a NuGet package and can be installed via the NuGet manager in Visual Studio or by running the following command:
88

99
```
10-
dotnet add package HttpClientTestHelpers
10+
dotnet add package TestableHttpClient
1111
```
1212

1313
## How to use
@@ -21,21 +21,21 @@ var result = await httpClient.GetAsync("http://httpbin.org/status/200");
2121
testHandler.ShouldHaveMadeRequestsTo("https://httpbin.org/*");
2222
```
2323

24-
More examples can be found in the [IntegrationTests project](https://github.com/dnperfors/httpclienttesthelpers/tree/master/test/HttpClientTestHelpers.IntegrationTests)
24+
More examples can be found in the [IntegrationTests project](https://github.com/dnperfors/TestableHttpClient/tree/master/test/TestableHttpClient.IntegrationTests)
2525

2626
## Contributing
2727

2828
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on how you can help us out.
2929

3030
## Versioning
3131

32-
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [releases on this repository](https://github.com/dnperfors/httpclienttesthelpers/releases).
32+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [releases on this repository](https://github.com/dnperfors/TestableHttpClient/releases).
3333

3434
## Authors
3535

3636
* **David Perfors** - [dnperfors](https://github.com/dnperfors)
3737

38-
See also the list of [contributors](https://github.com/dnperfors/httpclienttesthelpers/contributors) who participated in this project.
38+
See also the list of [contributors](https://github.com/dnperfors/TestableHttpClient/contributors) who participated in this project.
3939

4040
## License
4141

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ VisualStudioVersion = 16.0.29709.97
55
MinimumVisualStudioVersion = 15.0.26124.0
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4C8914F8-D732-462B-978E-3BB5DBE547D7}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HttpClientTestHelpers", "src\HttpClientTestHelpers\HttpClientTestHelpers.csproj", "{FD5111E1-2970-4DC4-84DD-E4966E17DCB3}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestableHttpClient", "src\TestableHttpClient\TestableHttpClient.csproj", "{FD5111E1-2970-4DC4-84DD-E4966E17DCB3}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{BBCED492-E92B-4FA8-A4A5-B5A76091F25E}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HttpClientTestHelpers.Tests", "test\HttpClientTestHelpers.Tests\HttpClientTestHelpers.Tests.csproj", "{70673E72-C346-4AC2-946D-D9F99816FC72}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestableHttpClient.Tests", "test\TestableHttpClient.Tests\TestableHttpClient.Tests.csproj", "{70673E72-C346-4AC2-946D-D9F99816FC72}"
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{800147F1-758C-406D-AF75-CB20EB7CDB18}"
1515
ProjectSection(SolutionItems) = preProject
@@ -18,7 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1818
README.md = README.md
1919
EndProjectSection
2020
EndProject
21-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpClientTestHelpers.IntegrationTests", "test\HttpClientTestHelpers.IntegrationTests\HttpClientTestHelpers.IntegrationTests.csproj", "{37A6C1C0-1117-43DE-BD15-290BC8AD32BE}"
21+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestableHttpClient.IntegrationTests", "test\TestableHttpClient.IntegrationTests\TestableHttpClient.IntegrationTests.csproj", "{37A6C1C0-1117-43DE-BD15-290BC8AD32BE}"
2222
EndProject
2323
Global
2424
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/HttpClientTestHelpers/HttpRequestMessageAsserter.cs renamed to src/TestableHttpClient/HttpRequestMessageAsserter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Net.Http;
55
using System.Text.Json;
66

7-
namespace HttpClientTestHelpers
7+
namespace TestableHttpClient
88
{
99
/// <summary>
1010
/// This class makes it easy to create assertions on a collection of <seealso cref="HttpRequestMessage"/>s.

src/HttpClientTestHelpers/HttpRequestMessageAssertionException.cs renamed to src/TestableHttpClient/HttpRequestMessageAssertionException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace HttpClientTestHelpers
3+
namespace TestableHttpClient
44
{
55
public class HttpRequestMessageAssertionException : Exception
66
{

src/HttpClientTestHelpers/HttpRequestMessageExtensions.cs renamed to src/TestableHttpClient/HttpRequestMessageExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Net.Http.Headers;
44
using System.Text.RegularExpressions;
55

6-
namespace HttpClientTestHelpers
6+
namespace TestableHttpClient
77
{
88
/// <summary>
99
/// A set of static methods for checking values on a <see cref="HttpRequestMessage"/>.
@@ -97,7 +97,7 @@ public static bool HasHttpMethod(this HttpRequestMessage httpRequestMessage, str
9797
/// <summary>
9898
/// Determines whether a specific header is set on a request.
9999
/// </summary>
100-
/// <remarks>This method only checks headers in <see cref="System.Net.Http.Headers.HttpRequestHeaders"/></remarks>
100+
/// <remarks>This method only checks headers in <see cref="HttpRequestHeaders"/></remarks>
101101
/// <param name="httpRequestMessage">A <see cref="HttpRequestMessage"/> to check the request header on.</param>
102102
/// <param name="headerName">The name of the header to locate on the request.</param>
103103
/// <returns>true when the request contains a header with the specified name; otherwise, false.</returns>
@@ -119,7 +119,7 @@ public static bool HasRequestHeader(this HttpRequestMessage httpRequestMessage,
119119
/// <summary>
120120
/// Determines whether a specific header with a specific value is set on a request.
121121
/// </summary>
122-
/// <remarks>This method only checks headers in <see cref="System.Net.Http.Headers.HttpRequestHeaders"/></remarks>
122+
/// <remarks>This method only checks headers in <see cref="HttpRequestHeaders"/></remarks>
123123
/// <param name="httpRequestMessage">A <see cref="HttpRequestMessage"/> to check the request header on.</param>
124124
/// <param name="headerName">The name of the header to locate on the request.</param>
125125
/// <param name="headerValue">The value the header should have. Wildcard is supported.</param>
@@ -147,7 +147,7 @@ public static bool HasRequestHeader(this HttpRequestMessage httpRequestMessage,
147147
/// <summary>
148148
/// Determines whether a specific header is set on a request.
149149
/// </summary>
150-
/// <remarks>This method only checks headers in <see cref="System.Net.Http.Headers.HttpContentHeaders"/></remarks>
150+
/// <remarks>This method only checks headers in <see cref="HttpContentHeaders"/></remarks>
151151
/// <param name="httpRequestMessage">A <see cref="HttpRequestMessage"/> to check the content header on.</param>
152152
/// <param name="headerName">The name of the header to locate on the request content.</param>
153153
/// <returns>true when the request contains a header with the specified name; otherwise, false.</returns>
@@ -174,7 +174,7 @@ public static bool HasContentHeader(this HttpRequestMessage httpRequestMessage,
174174
/// <summary>
175175
/// Determines whether a specific header with a specific value is set on a request.
176176
/// </summary>
177-
/// <remarks>This method only checks headers in <see cref="System.Net.Http.Headers.HttpContentHeaders"/></remarks>
177+
/// <remarks>This method only checks headers in <see cref="HttpContentHeaders"/></remarks>
178178
/// <param name="httpRequestMessage">A <see cref="HttpRequestMessage"/> to check the content header on.</param>
179179
/// <param name="headerName">The name of the header to locate on the request content.</param>
180180
/// <param name="headerValue">The value the header should have. Wildcard is supported.</param>

src/HttpClientTestHelpers/HttpResponseMessageBuilder.cs renamed to src/TestableHttpClient/HttpResponseMessageBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Text;
77
using System.Text.Json;
88

9-
namespace HttpClientTestHelpers
9+
namespace TestableHttpClient
1010
{
1111
/// <summary>
1212
/// This class helps creating an <see cref="HttpResponseMessage"/> using a fluent interface.

src/HttpClientTestHelpers/HttpClientTestHelpers.csproj renamed to src/TestableHttpClient/TestableHttpClient.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<Product />
1313
<Copyright>Copyright (c) 2020 David Perfors</Copyright>
1414
<Description>A simple library to make testing HttpClient and related classes easier.</Description>
15-
<PackageProjectUrl>https://github.com/dnperfors/httpclienttesthelpers</PackageProjectUrl>
16-
<RepositoryUrl>https://github.com/dnperfors/httpclienttesthelpers</RepositoryUrl>
15+
<PackageProjectUrl>https://github.com/dnperfors/TestableHttpClient</PackageProjectUrl>
16+
<RepositoryUrl>https://github.com/dnperfors/TestableHttpClient</RepositoryUrl>
1717
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
1818
</PropertyGroup>
1919

src/HttpClientTestHelpers/TestableHttpMessageHandler.cs renamed to src/TestableHttpClient/TestableHttpMessageHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Threading;
77
using System.Threading.Tasks;
88

9-
namespace HttpClientTestHelpers
9+
namespace TestableHttpClient
1010
{
1111
/// <summary>
1212
/// A testable HTTP message handler that captures all requests and always returns the same response.

test/HttpClientTestHelpers.IntegrationTests/.editorconfig renamed to test/TestableHttpClient.IntegrationTests/.editorconfig

File renamed without changes.

test/HttpClientTestHelpers.IntegrationTests/AssertingRequests.cs renamed to test/TestableHttpClient.IntegrationTests/AssertingRequests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using System.Net.Http;
22
using System.Text;
33
using System.Threading.Tasks;
4-
54
using Xunit;
65

7-
namespace HttpClientTestHelpers.IntegrationTests
6+
namespace TestableHttpClient.IntegrationTests
87
{
98
public class AssertingRequests
109
{

0 commit comments

Comments
 (0)