|
|
@ -28,10 +28,19 @@ namespace NzbDrone.Common.Test
|
|
|
|
|
|
|
|
|
|
|
|
// .net 4.6.2 throws NotSupportedException instead of ArgumentException here
|
|
|
|
// .net 4.6.2 throws NotSupportedException instead of ArgumentException here
|
|
|
|
[TestCase("http://")]
|
|
|
|
[TestCase("http://")]
|
|
|
|
public void DownloadString_should_throw_on_not_supported_string(string url)
|
|
|
|
public void DownloadString_should_throw_on_not_supported_string_windows(string url)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
WindowsOnly();
|
|
|
|
Assert.Throws<NotSupportedException>(() => Subject.DownloadString(url));
|
|
|
|
Assert.Throws<NotSupportedException>(() => Subject.DownloadString(url));
|
|
|
|
ExceptionVerification.ExpectedWarns(1);
|
|
|
|
ExceptionVerification.ExpectedWarns(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[TestCase("http://")]
|
|
|
|
|
|
|
|
public void DownloadString_should_throw_on_not_supported_string_mono(string url)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MonoOnly();
|
|
|
|
|
|
|
|
Assert.Throws<System.Net.WebException>(() => Subject.DownloadString(url));
|
|
|
|
|
|
|
|
ExceptionVerification.ExpectedWarns(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|