mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Add IUpdateSource; refactor UpdateManager so update package retrieval is no longer hard-coded.
This commit is contained in:
@@ -15,19 +15,19 @@ using Xunit;
|
||||
|
||||
namespace Squirrel.Tests
|
||||
{
|
||||
public class FakeUrlDownloader : IFileDownloader
|
||||
public class FakeUrlDownloader : Sources.IFileDownloader
|
||||
{
|
||||
public Task<byte[]> DownloadBytes(string url, string auth)
|
||||
public Task<byte[]> DownloadBytes(string url, string auth, string acc)
|
||||
{
|
||||
return Task.FromResult(new byte[0]);
|
||||
}
|
||||
|
||||
public Task DownloadFile(string url, string targetFile, Action<int> progress, string auth)
|
||||
public Task DownloadFile(string url, string targetFile, Action<int> progress, string auth, string acc)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task<string> DownloadString(string url, string auth)
|
||||
public Task<string> DownloadString(string url, string auth, string acc)
|
||||
{
|
||||
return Task.FromResult("");
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace Squirrel.Tests
|
||||
[Fact]
|
||||
public void CurrentlyInstalledVersionDoesNotThrow()
|
||||
{
|
||||
using var fixture = new UpdateManager(null);
|
||||
using var fixture = new UpdateManager();
|
||||
Assert.Null(fixture.CurrentlyInstalledVersion());
|
||||
Assert.False(fixture.IsInstalledApp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user