Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan committed Jun 13, 2024
1 parent 5b15680 commit 8962b4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public async Task HttpRequest_StringContent_WithoutMediaType()
await LoopbackServer.CreateServerAsync(async (server, uri) =>
{
var request = new HttpRequestMessage(HttpMethod.Post, uri);
request.Content = new StringContent("", null, ((MediaTypeHeaderValue)null)!);
request.Content = new StringContent("", null, (MediaTypeHeaderValue)null);
Task<HttpResponseMessage> requestTask = client.SendAsync(request);
await server.AcceptConnectionAsync(async connection =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void Ctor_PassNullHeaderValueForMediaType_NoMediaTypeUsed()
{
string sourceString = "\u00C4\u00E4\u00FC\u00DC";
Encoding defaultStringEncoding = Encoding.GetEncoding("utf-8");
var content = new StringContent(sourceString, defaultStringEncoding, ((Headers.MediaTypeHeaderValue)null)!);
var content = new StringContent(sourceString, defaultStringEncoding, (MediaTypeHeaderValue)null);

// If no media header value is passed-in, there is none
Assert.Null(content.Headers.ContentType);
Expand Down

0 comments on commit 8962b4b

Please sign in to comment.