aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs')
-rw-r--r--BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs b/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs
index 3d85c2ae..cd884c5e 100644
--- a/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs
+++ b/BackEnd/Timeline.Tests/IntegratedTests/HttpClientTestExtensions.cs
@@ -146,6 +146,11 @@ namespace Timeline.Tests.IntegratedTests
await client.TestJsonSendAssertInvalidModelAsync(HttpMethod.Post, url, jsonBody);
}
+ public static async Task TestPutAssertInvalidModelAsync(this HttpClient client, string url, object? jsonBody = null)
+ {
+ await client.TestJsonSendAssertInvalidModelAsync(HttpMethod.Put, url, jsonBody);
+ }
+
public static async Task TestDeleteAssertInvalidModelAsync(this HttpClient client, string url, object? jsonBody = null)
{
await client.TestJsonSendAssertInvalidModelAsync(HttpMethod.Delete, url, jsonBody);
@@ -201,6 +206,16 @@ namespace Timeline.Tests.IntegratedTests
await client.TestJsonSendAssertNotFoundAsync(HttpMethod.Get, url, jsonBody, errorCode, headerSetup);
}
+ public static async Task TestPutAssertNotFoundAsync(this HttpClient client, string url, object? jsonBody = null, int? errorCode = null, HeaderSetup? headerSetup = null)
+ {
+ await client.TestJsonSendAssertNotFoundAsync(HttpMethod.Put, url, jsonBody, errorCode, headerSetup);
+ }
+
+ public static async Task TestDeleteAssertNotFoundAsync(this HttpClient client, string url, object? jsonBody = null, int? errorCode = null, HeaderSetup? headerSetup = null)
+ {
+ await client.TestJsonSendAssertNotFoundAsync(HttpMethod.Delete, url, jsonBody, errorCode, headerSetup);
+ }
+
public static async Task<HttpResponseMessage> TestPutByteArrayAsync(this HttpClient client, string url, byte[] body, string mimeType, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
{
using var content = new ByteArrayContent(body);