Fix tests

pull/854/head
Next Turn 2021-08-09 13:37:26 +08:00
parent 4aa0b5b6f2
commit e9c557f9cb
1 changed files with 4 additions and 3 deletions

View File

@ -215,10 +215,11 @@ namespace winswTests
await this.TestClientServerAsync( await this.TestClientServerAsync(
async (source, dest) => async (source, dest) =>
{ {
var exception = await AsyncAssert.ThrowsAsync<WebException>( var exception = await AsyncAssert.ThrowsAsync<IOException>(
async () => await new Download(source, dest).PerformAsync()); 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 => context =>
{ {