using CursorLang.Core.Services; namespace CursorLang.Core.Tests.Services; /// /// Where the app looks for its releases. The values belong to the build, and a /// wrong one shows only as an update that never arrives. /// public sealed class UpdateOptionsTests { [Fact] public void Out_of_the_box_the_releases_are_looked_for_in_the_repository_of_the_app() { var options = new UpdateOptions(); Assert.Equal("git.alrakis.kz", options.ServiceUri.Host); Assert.Equal("alrakis/cursor-lang", options.Project); } [Fact] public void Another_server_is_taken_as_it_is_given() { var options = new UpdateOptions { ServiceUri = new Uri("https://git.example.com/"), Project = "team/app", }; Assert.Equal("git.example.com", options.ServiceUri.Host); Assert.Equal("team/app", options.Project); } [Fact] public void The_app_asks_about_releases_no_more_than_once_a_day() { Assert.Equal(TimeSpan.FromDays(1), new UpdateOptions().CheckInterval); } }