Skip to content

Commit

Permalink
style: fix a few code style/static analysis warning CS8620
Browse files Browse the repository at this point in the history
  • Loading branch information
skwasjer committed Aug 10, 2023
1 parent b48dc7e commit 16e0b84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static object[] CreateTestCase(HttpContent content, string expectedData)
yield return CreateTestCase(new StringContent(data), data);
yield return CreateTestCase(new ByteArrayContent(buffer), data);
yield return CreateTestCase(new StreamContent(new MemoryStream(buffer)), data);
yield return CreateTestCase(new FormUrlEncodedContent(new Dictionary<string, string> { { "key", data } }), "key=" + Uri.EscapeDataString(data));
yield return CreateTestCase(new FormUrlEncodedContent(new[] { new KeyValuePair<string?, string?>("key", data) }), "key=" + Uri.EscapeDataString(data));

var mpc = new MultipartContent("subtype", "boundary") { new StringContent(data) };
yield return CreateTestCase(mpc, "--boundary\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n<b>data</b>\r\n--boundary--\r\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public async Task When_configuring_formData_with_null_value_should_match()
RequestUri = new Uri("http://127.0.0.1"),
Content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("key", null!)
new KeyValuePair<string?, string?>("key", null!)
})
};

Expand All @@ -269,7 +269,7 @@ public async Task When_configuring_formData_with_empty_value_should_match()
RequestUri = new Uri("http://127.0.0.1"),
Content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("key", string.Empty)
new KeyValuePair<string?, string?>("key", string.Empty)
})
};

Expand Down

0 comments on commit 16e0b84

Please sign in to comment.