diff options
author | crupest <crupest@outlook.com> | 2021-01-19 15:24:39 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-01-19 15:24:39 +0800 |
commit | fb6442f1716406c7a2da79e4a1cc42e23908d218 (patch) | |
tree | 455fbd07678b1b21a1bfa3ad7e3778b1957fd12f /BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs | |
parent | 208ae3f6371857e2b06cf789a640989f64f80a24 (diff) | |
download | timeline-fb6442f1716406c7a2da79e4a1cc42e23908d218.tar.gz timeline-fb6442f1716406c7a2da79e4a1cc42e23908d218.tar.bz2 timeline-fb6442f1716406c7a2da79e4a1cc42e23908d218.zip |
test: Add integrated tests for search api.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs b/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs index b219f092..9848564f 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs @@ -78,6 +78,11 @@ namespace Timeline.Tests.IntegratedTests return await client.TestJsonSendAsync<T>(HttpMethod.Put, url, jsonBody, expectedStatusCode: expectedStatusCode);
}
+ public static async Task TestPatchAsync(this HttpClient client, string url, object? jsonBody = null, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
+ {
+ await client.TestJsonSendAsync(HttpMethod.Patch, url, jsonBody, expectedStatusCode: expectedStatusCode);
+ }
+
public static async Task<T> TestPatchAsync<T>(this HttpClient client, string url, object? jsonBody = null, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
{
return await client.TestJsonSendAsync<T>(HttpMethod.Patch, url, jsonBody, expectedStatusCode: expectedStatusCode);
|