Update test WebException to HttpRequestException

This commit is contained in:
Caelan Sayler
2022-01-06 22:57:46 +00:00
parent 4cb937b502
commit a82f0442ec
2 changed files with 6 additions and 1 deletions

View File

@@ -25,4 +25,8 @@
<ProjectReference Include="..\src\Squirrel\Squirrel.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Net.Http" />
</ItemGroup>
</Project>

View File

@@ -11,6 +11,7 @@ using Squirrel.Tests.TestHelpers;
using Xunit;
using System.Net;
using Squirrel.NuGet;
using System.Net.Http;
namespace Squirrel.Tests
{
@@ -314,7 +315,7 @@ namespace Squirrel.Tests
{
// This should result in a WebException (which gets caught) unless you can actually access http://lol
using (var fixture = new UpdateManager("http://lol", "theApp")) {
await Assert.ThrowsAsync(typeof(WebException), () => fixture.CheckForUpdate());
await Assert.ThrowsAsync(typeof(HttpRequestException), () => fixture.CheckForUpdate());
}
}