293 references to TestEnvironment
Aspire.Cli.Tests (293)
Acquisition\IdentityResolverTests.cs (1)
561var environment = new TestEnvironment(environmentVariables);
Acquisition\InstallationDiscoveryDiscoverAllTests.cs (7)
586environment: new TestEnvironment(), 615environment: new TestEnvironment(), 651environment: new TestEnvironment(), 694environment: new TestEnvironment(), 824environment: new TestEnvironment(), 934environment: new TestEnvironment(), 973environment: new TestEnvironment(),
Agents\AgentTelemetryHookTests.cs (15)
21Assert.Null(AgentTelemetryHook.Classify(payload, new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters)); 31var args = AgentTelemetryHook.Classify($$"""{"{{nameProperty}}":"{{tool}}","{{inputProperty}}":{{input}}}""", new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters); 46new TestEnvironment(), 60var environment = new TestEnvironment(new Dictionary<string, string?> 77Assert.NotNull(AgentTelemetryHook.Classify(payload, new TestEnvironment(), payload.Length)); 78Assert.Null(AgentTelemetryHook.Classify(payload, new TestEnvironment(), payload.Length - 1)); 84var hook = new AgentTelemetryHook(new TestEnvironment()); 103var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 120var args = AgentTelemetryHook.Classify("""{"toolName":"aspire-list_resources","toolArgs":"not json"}""", new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters); 133new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters); 152var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 226var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 250var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 268Assert.Null(AgentTelemetryHook.Classify(padded, new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters)); 269Assert.NotNull(AgentTelemetryHook.Classify(padded, new TestEnvironment(), padded.Length));
Agents\CopilotAgentEnvironmentScannerTests.cs (3)
27new TestEnvironment(), NullLogger<CopilotAgentEnvironmentScanner>.Instance); 50var environment = new TestEnvironment(new Dictionary<string, string?> { ["TERM_PROGRAM"] = "vscode" }); 77new FakeCopilotAppInstallationDetector(), new TestEnvironment(),
Agents\TelemetryHookConfiguratorTests.cs (1)
391var environment = new TestEnvironment(environmentVariables);
Agents\TelemetryHookScriptTests.cs (1)
550var nativeEnvironment = new TestEnvironment(environment);
Agents\VsCodeAgentEnvironmentScannerTests.cs (5)
24var scanner = new VsCodeAgentEnvironmentScanner(runner, CreateExecutionContext(workingDirectory), new TestEnvironment(), 52new TestEnvironment(), NullLogger<VsCodeAgentEnvironmentScanner>.Instance); 76CreateExecutionContext(workspace.WorkspaceRoot), new TestEnvironment(), 97var scanner = new VsCodeAgentEnvironmentScanner(runner, CreateExecutionContext(workspace.WorkspaceRoot), new TestEnvironment(), 118var environment = new TestEnvironment(new Dictionary<string, string?> { ["TERM_PROGRAM"] = "vscode" });
Backchannel\AppHostCliBackchannelTests.cs (4)
21var environment = new TestEnvironment(new Dictionary<string, string?> 70new TestEnvironment(), 103new TestEnvironment(), 127var environment = new TestEnvironment(new Dictionary<string, string?>
BundleServiceIntegrationTests.cs (2)
622await BundleService.ExtractPayloadAsync(stream, dest, new TestEnvironment(), CancellationToken.None); 793return new BundleService(provider, layoutDiscovery, new TestEnvironment(), NullLogger<BundleService>.Instance)
Caching\AppHostInfoDiskCacheTests.cs (12)
20return new AppHostInfoDiskCache(NullLogger<AppHostInfoDiskCache>.Instance, ctx, configurationService ?? new TestConfigurationService(), new TestEnvironment()); 31return new AppHostInfoDiskCache(NullLogger<AppHostInfoDiskCache>.Instance, ctx, configurationService, new TestEnvironment()); 672var key1 = AppHostInfoDiskCache.ComputeKeyAsync(new FileInfo(projectFile.FullName), new TestEnvironment()); 673var key2 = AppHostInfoDiskCache.ComputeKeyAsync(new FileInfo(projectFile.FullName), new TestEnvironment()); 685var keyA = AppHostInfoDiskCache.ComputeKeyAsync(projectA, new TestEnvironment()); 686var keyB = AppHostInfoDiskCache.ComputeKeyAsync(projectB, new TestEnvironment()); 711var keyLower = AppHostInfoDiskCache.ComputeKeyAsync(new FileInfo(lowerPath), new TestEnvironment()); 712var keyUpper = AppHostInfoDiskCache.ComputeKeyAsync(new FileInfo(upperDrivePath), new TestEnvironment()); 731var keyBeforeImport = AppHostInfoDiskCache.ComputeKeyAsync(projectFile, new TestEnvironment()); 733var keyAfterImport = AppHostInfoDiskCache.ComputeKeyAsync(new FileInfo(projectFile.FullName), new TestEnvironment()); 755var keyBeforeParentImportEdit = AppHostInfoDiskCache.ComputeKeyAsync(projectFile, new TestEnvironment()); 760var keyAfterParentImportEdit = AppHostInfoDiskCache.ComputeKeyAsync(new FileInfo(projectFile.FullName), new TestEnvironment());
CliBootstrapTests.cs (3)
360var environment = new TestEnvironment(); 394var environment = new TestEnvironment(envVars); 416var environment = new TestEnvironment();
Commands\AddCommandTests.cs (1)
1114var nuGetClient = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance)
Commands\AgentInitClientSelectionTests.cs (17)
641var environment = new TestEnvironment(); 770services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> { [variable] = value })); 794var environment = new TestEnvironment(); 844var environment = new TestEnvironment(); 899var environment = new TestEnvironment(); 937services.AddSingleton<IEnvironment>(new TestEnvironment( 964var environment = new TestEnvironment(); 1016var environment = new TestEnvironment(); 1057var environment = new TestEnvironment(new Dictionary<string, string?> { [variable] = value }); 1077var environment = new TestEnvironment(new Dictionary<string, string?> 1117var environment = new TestEnvironment(new Dictionary<string, string?> { ["OPENCODE_CONFIG"] = path }); 1146var environment = new TestEnvironment(new Dictionary<string, string?> { ["OPENCODE_CONFIG"] = path }); 1175var environment = new TestEnvironment(); 1228var environment = new TestEnvironment(); 1261var environment = new TestEnvironment(); 1291var environment = new TestEnvironment(); 1330var environment = new TestEnvironment();
Commands\AgentTelemetryCommandTests.cs (1)
102services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?>
Commands\AppHostLauncherTests.cs (1)
1352executionContext, new TestEnvironment(),
Commands\ConfigSourceCommandTests.cs (7)
739services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> 1173services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> 1270services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> 1389services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> 1445services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> 1481services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> 1504services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?>
Commands\DashboardRunCommandTests.cs (1)
730return new TestEnvironment(envVars);
Commands\DeployCommandTests.cs (1)
432services.AddSingleton<IEnvironment>(new TestEnvironment(explicitFile
Commands\GoAppHostToolingCheckTests.cs (1)
587new TestEnvironment(environment),
Commands\NewCommandLocalTemplateTests.InitConfig.cs (1)
254services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?>
Commands\NewCommandLocalTemplateTests.SourceList.cs (3)
306services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> 343services.AddSingleton<IEnvironment>(new TestEnvironment()); 410services.AddSingleton<IEnvironment>(new TestEnvironment());
Commands\NewCommandLocalTemplateTests.SourceListGit.cs (1)
300services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?>
Commands\SecretCommandTests.cs (4)
271new TestEnvironment(new Dictionary<string, string?> { ["API_KEY"] = useEnvvarSource ? value : "not-the-positional-value" }), 425using var provider = CreateSecretTestServices(workspace, outputWriter, appHostFile, userSecretsId, new TestEnvironment(), 472new TestEnvironment(new Dictionary<string, string?> { ["API_KEY"] = "environment-secret" })); 516new TestEnvironment(new Dictionary<string, string?> { ["API_KEY"] = secretValue }),
Commands\TypeScriptAppHostToolingCheckTests.cs (1)
280new TestEnvironment(),
Commands\VsCodeExtensionCheckTests.cs (12)
18var environment = new TestEnvironment(new Dictionary<string, string?>()); 34var environment = new TestEnvironment(new Dictionary<string, string?> 64var environment = new TestEnvironment(new Dictionary<string, string?> 93var environment = new TestEnvironment(new Dictionary<string, string?> 118var environment = new TestEnvironment(new Dictionary<string, string?> 139var environment = new TestEnvironment(new Dictionary<string, string?> 160var environment = new TestEnvironment(new Dictionary<string, string?>()); 174var environment = new TestEnvironment(new Dictionary<string, string?>()); 190var environment = new TestEnvironment(new Dictionary<string, string?> 209var environment = new TestEnvironment(new Dictionary<string, string?> 231var environment = new TestEnvironment(new Dictionary<string, string?> 252var environment = new TestEnvironment(new Dictionary<string, string?>
Configuration\ConfigSourceServiceTests.cs (14)
34var environment = new TestEnvironment(new Dictionary<string, string?> 96var environment = new TestEnvironment(new Dictionary<string, string?> 119var environment = new TestEnvironment(new Dictionary<string, string?> 173var environment = new TestEnvironment(new Dictionary<string, string?> 818environment: new TestEnvironment(new Dictionary<string, string?> 840environment: new TestEnvironment(new Dictionary<string, string?> 903var environment = new TestEnvironment(new Dictionary<string, string?> 931environment: new TestEnvironment(new Dictionary<string, string?> 963environment: new TestEnvironment(new Dictionary<string, string?> 984environment: new TestEnvironment(new Dictionary<string, string?> 1021var environment = new TestEnvironment(new Dictionary<string, string?> 1273var environment = new TestEnvironment(new Dictionary<string, string?> 1990var environment = new TestEnvironment(new Dictionary<string, string?> 2021var environment = new TestEnvironment(new Dictionary<string, string?>
Configuration\DotNetBasedAppHostServerChannelResolutionTests.cs (1)
118new TestEnvironment(),
Configuration\PrebuiltAppHostServerChannelResolutionTests.cs (1)
109new TestEnvironment(),
DotNet\DotNetCliRunnerTests.cs (2)
108new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance); 172new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\OwnedProcessExecutionTests.cs (1)
26var factory = new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\ProcessExecutionDetachedTests.cs (1)
129var factory = new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\ProcessExecutionFactoryEnvironmentTests.cs (1)
168=> new(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\ProcessExecutionTests.cs (2)
231new TestEnvironment(), loggerFactory.CreateLogger<ProcessExecutionFactory>()).CreateExecution( 353var factory = new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNetSdkInstallerTests.cs (2)
33var environment = new TestEnvironment(); 308environment ??= new TestEnvironment();
Git\GitRepositoryTests.cs (3)
39var repo = new GitRepository(workspace.CreateExecutionContext(), new TestEnvironment(), logger, profilingTelemetry); 79var repository = new GitRepository(context, new TestEnvironment(), NullLogger<GitRepository>.Instance, profilingTelemetry); 249return new GitRepository(workspace.CreateExecutionContext(), new TestEnvironment(), loggerFactory.CreateLogger<GitRepository>(), profilingTelemetry);
Interaction\ConsoleInteractionServiceTests.cs (3)
244environment: new TestEnvironment(new Dictionary<string, string?> 285environment: new TestEnvironment(new Dictionary<string, string?> 320environment: new TestEnvironment(new Dictionary<string, string?>
Layout\LayoutDiscoveryReparsePointTests.cs (2)
246var discovery = new LayoutDiscovery(NullLogger<LayoutDiscovery>.Instance, new TestEnvironment()) 284var discovery = new LayoutDiscovery(NullLogger<LayoutDiscovery>.Instance, new TestEnvironment())
Layout\TrayLayoutTests.cs (1)
46var environment = new TestEnvironment(new Dictionary<string, string?>
Npm\NpmRunnerTests.cs (9)
35var startInfo = NpmRunner.CreateNpmProcessStartInfo("/usr/bin/npm", ["view", "express", "version"], "/tmp/workdir", new TestEnvironment(), stdin); 56@"C:\temp\workdir", new TestEnvironment(), stdin); 77@"C:\temp", new TestEnvironment(), stdin); 94@"C:\temp", new TestEnvironment(), stdin); 110"/tmp/workdir", new TestEnvironment(), stdin); 127"/tmp", new TestEnvironment(), stdin); 140var startInfo = NpmRunner.CreateNpmProcessStartInfo("/usr/bin/npm", [], "/tmp", new TestEnvironment(), stdin); 152var startInfo = NpmRunner.CreateNpmProcessStartInfo(@"C:\Program Files\nodejs\npm.cmd", [], @"C:\temp", new TestEnvironment(), stdin); 174var runner = new NpmRunner(new TestEnvironment(), NullLogger<NpmRunner>.Instance, profilingTelemetry);
NuGet\NuGetClientTests.cs (28)
38var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance) 260new TestEnvironment(), 287new TestEnvironment(), 345var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance); 455var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), logger); 572new TestEnvironment(), 610new TestEnvironment(), 636new TestEnvironment(), 675new TestEnvironment(), 720new TestEnvironment(), 749new TestEnvironment(), 879var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance); 966var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance); 1010new TestEnvironment(), 1115new TestEnvironment(), 1175new TestEnvironment(), 1223new TestEnvironment(), 1278new TestEnvironment(), 1334new TestEnvironment(), 1397new TestEnvironment(), 1460new TestEnvironment(), 1513new TestEnvironment(), 1569new TestEnvironment(), 1632new TestEnvironment(), 1691new TestEnvironment(), 1757new TestEnvironment(), 1777new TestEnvironment(), 1797new TestEnvironment(),
NuGet\NuGetConfigurationQueryTests.cs (1)
509new TestEnvironment(),
NuGet\NuGetPackageOperationConfigurationTests.cs (1)
233new TestEnvironment(),
NuGet\NuGetSignatureVerificationEnablerTests.cs (1)
15return new TestEnvironment(envVars);
Processes\ProcessTreeGracefulShutdownServiceTests.cs (1)
412executionContext, environment ?? new TestEnvironment(),
Projects\AppHostCandidateFinderTests.cs (3)
589return new AppHostCandidateFinder(gitRepository ?? new TestGitRepository(), new TestEnvironment(), profilingTelemetry ?? CreateProfilingTelemetry(), NullLogger<AppHostCandidateFinder>.Instance); 596var gitRepository = new GitRepository(executionContext, new TestEnvironment(), loggerFactory.CreateLogger<GitRepository>(), profilingTelemetry); 597return new AppHostCandidateFinder(gitRepository, new TestEnvironment(), profilingTelemetry, loggerFactory.CreateLogger<AppHostCandidateFinder>());
Projects\AppHostConfigurationProjectorTests.cs (5)
29var projector = new AppHostConfigurationProjector(configurationService, new TestEnvironment()); 48var projector = new AppHostConfigurationProjector(configurationService, new TestEnvironment()); 63var environment = new TestEnvironment(new Dictionary<string, string?> 88var projector = new AppHostConfigurationProjector(configurationService, new TestEnvironment()); 103var projector = new AppHostConfigurationProjector(configurationService, new TestEnvironment());
Projects\AppHostServerProjectTests.cs (6)
46return new DotNetBasedAppHostServerProject(appPath, socketPath, repoRoot, runner, packagingService, new TestProcessExecutionFactory(), new TestEnvironment(), logger); 110new TestProcessExecutionFactory(), new TestEnvironment(), 520var project = new DotNetBasedAppHostServerProject(appPath, "test.sock", appPath, runner, packagingService, new TestProcessExecutionFactory(), new TestEnvironment(), logger, projectModelPath); 601new TestEnvironment(), 645new TestEnvironment(), 691new TestEnvironment(),
Projects\AppHostServerSessionTests.cs (3)
563return new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance) 640new TestEnvironment(), 664new TestEnvironment(),
Projects\DotNetAppHostProjectTests.cs (5)
573var environment = new TestEnvironment(new Dictionary<string, string?> 642? new TestEnvironment() 643: new TestEnvironment(environmentVariables.ToDictionary(pair => pair.Key, pair => (string?)pair.Value)); 1265var environment = new TestEnvironment(new Dictionary<string, string?> 1316var environment = new TestEnvironment(new Dictionary<string, string?>
Projects\DotNetBasedAppHostServerScaffoldCacheTests.cs (1)
213new TestEnvironment(),
Projects\GuestAppHostProjectTests.cs (1)
2574var effectiveEnvironment = environment ?? new TestEnvironment();
Projects\GuestRuntimeTests.cs (3)
31new TestEnvironment(), _loggerFactory.CreateLogger<ProcessExecutionFactory>())); 41new TestEnvironment(), 44new TestEnvironment(), _loggerFactory.CreateLogger<ProcessExecutionFactory>()),
Projects\NativeAppHostServerProjectTests.cs (3)
43var factory = CreateFactory(new TestEnvironment(new Dictionary<string, string?> 60var factory = CreateFactory(new TestEnvironment(), new NullBundleService(), new TestProcessExecutionFactory()); 102var factory = CreateFactory(new TestEnvironment(new Dictionary<string, string?>
Projects\PrebuiltAppHostServerTests.cs (7)
263new TestEnvironment(), 1513new TestEnvironment(), 2414new TestEnvironment(), 3294new TestEnvironment(), 4590new TestEnvironment(), 5049new TestEnvironment(), 5061new TestEnvironment(),
Projects\ProcessGuestLauncherTests.cs (1)
27new TestEnvironment(), _loggerFactory.CreateLogger<ProcessExecutionFactory>()));
Projects\ProjectLocatorTests.cs (5)
3025var projectLocator = CreateProjectLocator(executionContext, projectFactory: projectFactory, environment: new TestEnvironment(envVars)); 3093var projectLocator = CreateProjectLocator(executionContext, projectFactory: projectFactory, environment: new TestEnvironment(envVars)); 3133var projectLocator = CreateProjectLocator(executionContext, projectFactory: projectFactory, environment: new TestEnvironment(envVars)); 4300environment ?? new TestEnvironment(), 4307environment ?? new TestEnvironment(),
Projects\ProjectUpdaterNuGetConfigurationTests.cs (2)
448new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance); 550new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
Projects\TypeScriptAppHostToolchainResolverTests.cs (22)
20var toolchain = TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null); 31var toolchain = TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null); 46() => TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null)); 60var resolution = TypeScriptAppHostToolchainResolver.ResolveWithReason(workspace.WorkspaceRoot, new TestEnvironment()); 73var resolution = TypeScriptAppHostToolchainResolver.ResolveWithReason(workspace.WorkspaceRoot, new TestEnvironment()); 86var resolution = TypeScriptAppHostToolchainResolver.ResolveWithReason(workspace.WorkspaceRoot, new TestEnvironment()); 99var toolchain = TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null); 111var exception = Assert.Throws<YarnClassicNotSupportedException>(() => TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null)); 122var toolchain = TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null); 135var exception = Assert.Throws<YarnClassicNotSupportedException>(() => TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null)); 151var exception = Assert.Throws<YarnClassicNotSupportedException>(() => TypeScriptAppHostToolchainResolver.Resolve(appHostDirectory, new TestEnvironment(), logger: null)); 167var resolution = TypeScriptAppHostToolchainResolver.ResolveWithReason(appHostDirectory, new TestEnvironment()); 181var resolution = TypeScriptAppHostToolchainResolver.ResolveWithReason(workspace.WorkspaceRoot, new TestEnvironment()); 194var toolchain = TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null); 205var toolchain = TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger: null); 220var toolchain = TypeScriptAppHostToolchainResolver.Resolve(workspace.WorkspaceRoot, new TestEnvironment(), logger); 237var toolchain = TypeScriptAppHostToolchainResolver.Resolve(appHostDirectory, new TestEnvironment(), logger: null); 251var resolution = TypeScriptAppHostToolchainResolver.ResolveWithReason(appHostDirectory, new TestEnvironment()); 267var resolution = TypeScriptAppHostToolchainResolver.ResolveWithReason(appHostDirectory, new TestEnvironment()); 281var toolchain = TypeScriptAppHostToolchainResolver.Resolve(appHostDirectory, new TestEnvironment(), logger: null); 291var shouldSearch = TypeScriptAppHostToolchainResolver.ShouldSearchParentDirectory(directory, new TestEnvironment()); 303new TestEnvironment(),
Scaffolding\ChannelReseedTests.cs (2)
88environment: new TestEnvironment(), 127environment: new TestEnvironment(),
Scaffolding\DefaultHostingPackagesTests.cs (1)
201environment: new TestEnvironment(),
Scaffolding\ScaffoldingServiceTests.cs (1)
195new TestEnvironment(),
Telemetry\AspireCliTelemetryTests.cs (4)
816services.AddSingleton<IEnvironment>(new TestEnvironment(environmentVariables)); 829var environment = new TestEnvironment(environmentVariables.ToDictionary(variable => variable.Item1, variable => variable.Item2, StringComparer.Ordinal)); 841var environment = new TestEnvironment(new Dictionary<string, string?>(comparer) 854var detector = new CodingAgentDetector(new TestEnvironment(environmentVariables));
Telemetry\CIEnvironmentDetectorTests.cs (8)
16var environment = new TestEnvironment(); 59var environment = new TestEnvironment(new Dictionary<string, string?> { [variableName] = value }); 85var environment = new TestEnvironment(new Dictionary<string, string?> 110var environment = new TestEnvironment(new Dictionary<string, string?> { [variableName] = value }); 125var environment = new TestEnvironment(new Dictionary<string, string?> 144var environment = new TestEnvironment(new Dictionary<string, string?> { [variableName] = "true" }); 160var environment = new TestEnvironment(new Dictionary<string, string?> { ["CI"] = environmentValue }); 176var environment = new TestEnvironment(new Dictionary<string, string?>(StringComparer.Ordinal)
Telemetry\InternalMicrosoftDetectorTests.cs (2)
918return new ProcessExecution(startInfo, NullLogger.Instance, options, new TestEnvironment()); 1722var effectiveEnvironment = environment ?? new TestEnvironment(environmentVariables);
TestServices\NuGetTestHelper.cs (1)
46=> new(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance)
TestServices\TestConfigSourceServices.cs (1)
34return new ConfigSourceService(context, environment ?? new TestEnvironment(), detector ?? new TestConfigSourceDetector(),
Utils\ContainerRuntimeCheckTests.cs (3)
167var environment = new TestEnvironment(new Dictionary<string, string?> 193var check = new ContainerRuntimeCheck(NullLogger<ContainerRuntimeCheck>.Instance, new TestEnvironment()); 207var environment = new TestEnvironment(new Dictionary<string, string?> { [variableName] = configuredRuntime });
Utils\DeprecatedWorkloadCheckTests.cs (1)
18var environment = new TestEnvironment();
Utils\EnvironmentVariableExtensionsTests.cs (1)
21var environment = new TestEnvironment(new Dictionary<string, string?>
Utils\FileSystemHelperTests.cs (15)
267var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 282var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 297var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 312var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 323var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 333var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 346var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 360var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 375var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 390var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 399var result = FileSystemHelper.ShortenPaths(Array.Empty<string>(), new TestEnvironment()); 414var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 430var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 447var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment()); 462var result = FileSystemHelper.ShortenPaths(paths, new TestEnvironment());
Utils\MissingJavaScriptToolWarningTests.cs (1)
54var message = MissingJavaScriptToolWarning.GetMessage(workspace.WorkspaceRoot, s_typeScriptLanguage, new TestEnvironment());
Utils\TestEnvironment.cs (4)
51=> new(variables) { ReportRuntimeIdentifier = "win-x64", ReportIsWindows = true, ReportIsLinux = false, ReportIsMacOS = false }; 54=> new(variables) { ReportRuntimeIdentifier = "linux-x64", ReportIsWindows = false, ReportIsLinux = true, ReportIsMacOS = false }; 57=> new() { ReportRuntimeIdentifier = "linux-musl-x64", ReportIsWindows = false, ReportIsLinux = true, ReportIsMacOS = false }; 60=> new(variables) { ReportRuntimeIdentifier = "osx-arm64", ReportIsWindows = false, ReportIsLinux = false, ReportIsMacOS = true };