diff --git a/Directory.Packages.props b/Directory.Packages.props
index cdaac4451..7eaedfa27 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,8 +3,8 @@
true
- 10.0.0-rc.2.25502.107
- 10.0.0-rc.2.25502.107
+ 10.0.0
+ 10.0.0
9.0.10
@@ -46,7 +46,7 @@
-
+
\ No newline at end of file
diff --git a/test/RestSharp.Tests.Integrated/CompressionTests.cs b/test/RestSharp.Tests.Integrated/CompressionTests.cs
index ef79b2abf..c20526423 100644
--- a/test/RestSharp.Tests.Integrated/CompressionTests.cs
+++ b/test/RestSharp.Tests.Integrated/CompressionTests.cs
@@ -31,7 +31,7 @@ public async Task Can_Handle_Deflate_Compressed_Content() {
var body = await GetBody(s => new DeflateStream(s, CompressionMode.Compress, true), value);
ConfigureServer(server, body, "deflate");
- using var client = new RestClient(server.Url!);
+ using var client = new RestClient(server.Url!, options => options.AutomaticDecompression = DecompressionMethods.Deflate);
var request = new RestRequest("");
var response = await client.ExecuteAsync(request);
diff --git a/test/RestSharp.Tests.Integrated/NonProtocolExceptionHandlingTests.cs b/test/RestSharp.Tests.Integrated/NonProtocolExceptionHandlingTests.cs
index fd2f6905f..b11f1ba02 100644
--- a/test/RestSharp.Tests.Integrated/NonProtocolExceptionHandlingTests.cs
+++ b/test/RestSharp.Tests.Integrated/NonProtocolExceptionHandlingTests.cs
@@ -16,20 +16,7 @@ class StupidClass {
readonly WireMockServer _server = WireMockServer.Start();
- ///
- /// Success of this test is based largely on the behavior of your current DNS.
- /// For example, if you're using OpenDNS this will test will fail; ResponseStatus will be Completed.
- ///
- [Fact]
- public async Task Handles_Non_Existent_Domain() {
- using var client = new RestClient("http://nonexistantdomainimguessing.org");
-
- var request = new RestRequest("foo");
- var response = await client.ExecuteAsync(request);
-
- response.ResponseStatus.Should().Be(ResponseStatus.Error);
- }
-
+#if NET
[Fact]
public async Task Handles_HttpClient_Timeout_Error() {
using var client = new RestClient(new HttpClient { Timeout = TimeSpan.FromMilliseconds(500) });
@@ -38,8 +25,9 @@ public async Task Handles_HttpClient_Timeout_Error() {
var response = await client.ExecuteAsync(request);
response.ErrorException.Should().BeOfType();
- response.ResponseStatus.Should().Be(ResponseStatus.TimedOut);
+ response.ResponseStatus.Should().Be(ResponseStatus.TimedOut, response.ErrorMessage);
}
+#endif
[Fact]
public async Task Handles_Server_Timeout_Error() {
@@ -65,7 +53,7 @@ public async Task Handles_Server_Timeout_Error_With_Deserializer() {
}
[Fact]
- public async Task Task_Handles_Non_Existent_Domain() {
+ public async Task Handles_Non_Existent_Domain() {
using var client = new RestClient("http://this.cannot.exist:8001");
var request = new RestRequest("/") {
@@ -75,7 +63,6 @@ public async Task Task_Handles_Non_Existent_Domain() {
var response = await client.ExecuteAsync(request);
response.ErrorException.Should().BeOfType();
- response.ErrorException!.Message.Should().Contain("known");
response.ResponseStatus.Should().Be(ResponseStatus.Error);
}
}
\ No newline at end of file
diff --git a/test/RestSharp.Tests.Integrated/RequestBodyTests.cs b/test/RestSharp.Tests.Integrated/RequestBodyTests.cs
index d20d07c95..a2636d5e0 100644
--- a/test/RestSharp.Tests.Integrated/RequestBodyTests.cs
+++ b/test/RestSharp.Tests.Integrated/RequestBodyTests.cs
@@ -12,6 +12,7 @@ public sealed class RequestBodyTests : IDisposable {
readonly WireMockServer _server = WireMockServer.Start(s => s.AllowBodyForAllHttpMethods = true);
async Task AssertBody(Method method, bool disableCharset = false) {
+#if NET
var options = new RestClientOptions(_server.Url!) { DisableCharset = disableCharset };
using var client = new RestClient(options);
var request = new RestRequest(RequestBodyCapturer.Resource, method);
@@ -25,6 +26,7 @@ async Task AssertBody(Method method, bool disableCharset = false) {
var expected = disableCharset ? ExpectedTextContentTypeNoCharset : ExpectedTextContentType;
AssertHasRequestBody(capturer, expected, bodyData);
+#endif
}
[Fact]
diff --git a/test/RestSharp.Tests.Integrated/RequestTests.cs b/test/RestSharp.Tests.Integrated/RequestTests.cs
index 70c7661fd..cd53e6c56 100644
--- a/test/RestSharp.Tests.Integrated/RequestTests.cs
+++ b/test/RestSharp.Tests.Integrated/RequestTests.cs
@@ -50,6 +50,7 @@ public async Task Can_Perform_GET_Async() {
response.Content.Should().Be(val);
}
+#if NET
[Fact]
public async Task Can_Timeout_GET_Async() {
var request = new RestRequest("timeout").AddBody("Body_Content");
@@ -59,8 +60,9 @@ public async Task Can_Timeout_GET_Async() {
var response = await _client.ExecuteAsync(request);
- Assert.Equal(ResponseStatus.TimedOut, response.ResponseStatus);
+ response.ResponseStatus.Should().Be(ResponseStatus.TimedOut, response.ErrorMessage);
}
+#endif
[Fact]
public async Task Can_Perform_Delete_With_Response_Type() {