mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-01 01:11:36 -05:00
The status bar shows the running version, and the Help menu gains Check for Updates (an immediate check sharing the background check's lock) and About OpenNest. A copy that is not a Velopack installation offers to open the GitHub Releases page instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
919 B
C#
26 lines
919 B
C#
namespace OpenNest.WinForms.Tests;
|
|
|
|
public class UpdaterServiceTests
|
|
{
|
|
[Fact]
|
|
public async Task ManualCheckOutsideAnInstallationReportsNotInstalled()
|
|
{
|
|
// Test hosts never start through VelopackApp, so there is no locator.
|
|
using var updater = new UpdaterService(feedUrl: null, includeDevBuilds: false);
|
|
|
|
Assert.False(updater.CanUpdate);
|
|
Assert.Equal(UpdaterService.CheckResult.NotInstalled, await updater.CheckNowAsync());
|
|
Assert.False(updater.HasPendingUpdate);
|
|
}
|
|
|
|
[Fact]
|
|
public void VersionOutsideAnInstallationIsTheAssemblyVersionWithoutBuildMetadata()
|
|
{
|
|
using var updater = new UpdaterService(feedUrl: null, includeDevBuilds: false);
|
|
|
|
Assert.Equal(UpdaterService.DisplayVersion(), updater.CurrentVersion);
|
|
Assert.DoesNotContain("+", updater.CurrentVersion);
|
|
Assert.StartsWith("0.", updater.CurrentVersion);
|
|
}
|
|
}
|