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 => {