diff --git a/test/MockHttp.Tests/Extensions/HttpContentExtensionsTests.cs b/test/MockHttp.Tests/Extensions/HttpContentExtensionsTests.cs index e35e2346..6fe68b94 100644 --- a/test/MockHttp.Tests/Extensions/HttpContentExtensionsTests.cs +++ b/test/MockHttp.Tests/Extensions/HttpContentExtensionsTests.cs @@ -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 { { "key", data } }), "key=" + Uri.EscapeDataString(data)); + yield return CreateTestCase(new FormUrlEncodedContent(new[] { new KeyValuePair("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\ndata\r\n--boundary--\r\n"); diff --git a/test/MockHttp.Tests/Extensions/RequestMatchingExtensionsTests.cs b/test/MockHttp.Tests/Extensions/RequestMatchingExtensionsTests.cs index 2f4c048b..e3a010c0 100644 --- a/test/MockHttp.Tests/Extensions/RequestMatchingExtensionsTests.cs +++ b/test/MockHttp.Tests/Extensions/RequestMatchingExtensionsTests.cs @@ -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("key", null!) + new KeyValuePair("key", null!) }) }; @@ -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("key", string.Empty) + new KeyValuePair("key", string.Empty) }) };