Fix InvalidOperationException when there are no full remote releases

This commit is contained in:
Stefan Paul Noack
2024-03-12 13:14:53 +02:00
committed by Caelan Sayler
parent 685b4b6744
commit d03caa0cc2
2 changed files with 13 additions and 1 deletions

View File

@@ -294,6 +294,18 @@ public class UpdateManagerTests
Assert.Throws<ArgumentException>(() => um.CheckForUpdates());
}
[Fact]
public void CheckFromEmptyFileSource()
{
using var logger = _output.BuildLoggerFor<UpdateManagerTests>();
using var _1 = Utility.GetTempDirectory(out var tempPath);
var source = new SimpleFileSource(new DirectoryInfo(tempPath));
var locator = new TestVelopackLocator("MyCoolApp", "1.0.0", tempPath, logger);
var um = new UpdateManager(source, null, logger, locator);
var info = um.CheckForUpdates();
Assert.Null(info);
}
[Fact]
public void NoUpdatesIfCurrentEqualsRemoteVersion()
{