From e9c557f9cb02fe929945ae1811473925c5bac046 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+nxtn@users.noreply.github.com> Date: Mon, 9 Aug 2021 13:37:26 +0800 Subject: [PATCH] Fix tests --- src/WinSW.Tests/DownloadTests.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/WinSW.Tests/DownloadTests.cs b/src/WinSW.Tests/DownloadTests.cs index 3c62c66..4380b9d 100644 --- a/src/WinSW.Tests/DownloadTests.cs +++ b/src/WinSW.Tests/DownloadTests.cs @@ -215,10 +215,11 @@ namespace winswTests await this.TestClientServerAsync( async (source, dest) => { - var exception = await AsyncAssert.ThrowsAsync( - async () => await new Download(source, dest).PerformAsync()); + var exception = await AsyncAssert.ThrowsAsync( + async () => await new Download(source, dest, true).PerformAsync()); - Assert.That(exception.Status, Is.EqualTo(WebExceptionStatus.ProtocolError)); + var inner = (WebException)exception.InnerException; + Assert.That(inner.Status, Is.EqualTo(WebExceptionStatus.ProtocolError)); }, context => {