public void DownloadUrlInEnvironmentVar_InvalidUrl_UseDefault() { // Arrange SetUrlEnvironmentVariable("invalid uri"); // Act var installer = new VSIX.DaemonInstaller(logger, "any", "any", envSettingsMock.Object); // Assert installer.DownloadUrl.Should().Be(VSIX.DaemonInstaller.DefaultDownloadUrl); installer.DaemonVersion.Should().Be(VSIX.DaemonInstaller.DefaultDaemonVersion); }
public void DownloadUrlInEnvironmentVar_InvalidVersion_UseDefault() { // Arrange SetUrlEnvironmentVariable("http://somewhere/sonarlint-daemon.zip"); // Act var installer = new VSIX.DaemonInstaller(logger, "any", "any", envSettingsMock.Object); // Assert installer.DownloadUrl.Should().Be(VSIX.DaemonInstaller.DefaultDownloadUrl); installer.DaemonVersion.Should().Be(VSIX.DaemonInstaller.DefaultDaemonVersion); }
public void DownloadUrlInEnvironmentVar_InvalidVersion_UseDefault() { using (var scope = new EnvironmentVariableScope()) { // Arrange scope.SetVariable(VSIX.DaemonInstaller.SonarLintDownloadUrlEnvVar, "http://somewhere/sonarlint-daemon.zip"); // Act var installer = new VSIX.DaemonInstaller(logger); // Assert installer.DownloadUrl.Should().Be(VSIX.DaemonInstaller.DefaultDownloadUrl); installer.DaemonVersion.Should().Be(VSIX.DaemonInstaller.DefaultDaemonVersion); } }