public AppUpdates(IAppUpdateConfig config, ILaunchableFile launchableFile) { Ensure.NotNull(config, nameof(config)); config.Validate(); _releaseStorage = new OrderedReleaseStorage( new SafeReleaseStorage( new WebReleaseStorage(config))); _updatesDirectory = new SafeUpdatesDirectory( new UpdatesDirectory(config.UpdatesPath, config.CurrentVersion) ); _fileLocation = new FileLocation(_updatesDirectory.Path); _downloadable = new SafeDownloadableFile( new DownloadableFile(config.HttpClient)); _validatable = new SafeValidatableFile( new CachingValidatableFile( new ValidatableFile())); _launchable = new SafeLaunchableFile(launchableFile); }
public void TestInitialize() { _launchableFile = Substitute.For <ILaunchableFile>(); _httpClient = Substitute.For <IHttpClient>(); _config = new DefaultAppUpdateConfig { HttpClient = _httpClient, FeedUri = new Uri("http://127.0.0.1/win-update.json"), UpdatesPath = "Updates", CurrentVersion = new Version(), EarlyAccessCategoryName = "EarlyAccess" }; }
public SafeLaunchableFile(ILaunchableFile origin) { _origin = origin; }
public void TestInitialize() { _origin = Substitute.For <ILaunchableFile>(); }