250 instantiations of TestEnvironment
Aspire.Cli.Tests (250)
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 (14)
20Assert.Null(AgentTelemetryHook.Classify(payload, new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters)); 28var args = AgentTelemetryHook.Classify($$"""{"{{nameProperty}}":"{{tool}}","{{inputProperty}}":{{input}}}""", new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters); 40var environment = new TestEnvironment(new Dictionary<string, string?> 57Assert.NotNull(AgentTelemetryHook.Classify(payload, new TestEnvironment(), payload.Length)); 58Assert.Null(AgentTelemetryHook.Classify(payload, new TestEnvironment(), payload.Length - 1)); 64var hook = new AgentTelemetryHook(new TestEnvironment()); 83var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 100var args = AgentTelemetryHook.Classify("""{"toolName":"aspire-list_resources","toolArgs":"not json"}""", new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters); 113new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters); 132var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 200var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 224var hook = new AgentTelemetryHook(new TestEnvironment(new Dictionary<string, string?> 242Assert.Null(AgentTelemetryHook.Classify(padded, new TestEnvironment(), AgentTelemetryHook.DefaultMaxPayloadCharacters)); 243Assert.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)
388var environment = new TestEnvironment(environmentVariables);
Agents\TelemetryHookScriptTests.cs (1)
541var 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 (2)
19var environment = new TestEnvironment(new Dictionary<string, string?> 54var environment = new TestEnvironment(new Dictionary<string, string?>
BundleServiceIntegrationTests.cs (2)
622await BundleService.ExtractPayloadAsync(stream, dest, new TestEnvironment(), CancellationToken.None); 792return 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)
363var environment = new TestEnvironment(); 397var environment = new TestEnvironment(envVars); 419var environment = new TestEnvironment();
Commands\AgentInitClientSelectionTests.cs (20)
493var environment = new TestEnvironment(); 622services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> { [variable] = value })); 646var environment = new TestEnvironment(); 694var environment = new TestEnvironment(); 748var environment = new TestEnvironment(); 783jsoncPath, AgentClient.OpenCode, AgentConfigurationScope.Project, new TestEnvironment(), CancellationToken.None); 800services.AddSingleton<IEnvironment>(new TestEnvironment( 827var environment = new TestEnvironment(); 878var environment = new TestEnvironment(); 918var environment = new TestEnvironment(new Dictionary<string, string?> { [variable] = value }); 938var environment = new TestEnvironment(new Dictionary<string, string?> 979var path = client.GetMcpConfigPath(AgentConfigurationScope.Global, workspace.WorkspaceRoot, executionContext, new TestEnvironment()); 980var environment = new TestEnvironment(new Dictionary<string, string?> { ["OPENCODE_CONFIG"] = path }); 1009var path = client.GetMcpConfigPath(AgentConfigurationScope.Global, workspace.WorkspaceRoot, executionContext, new TestEnvironment()); 1010var environment = new TestEnvironment(new Dictionary<string, string?> { ["OPENCODE_CONFIG"] = path }); 1039var environment = new TestEnvironment(); 1092var environment = new TestEnvironment(); 1125var environment = new TestEnvironment(); 1154var environment = new TestEnvironment(); 1192var environment = new TestEnvironment();
Commands\AgentTelemetryCommandTests.cs (1)
102services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?>
Commands\AppHostLauncherTests.cs (1)
1352executionContext, new TestEnvironment(),
Commands\DashboardRunCommandTests.cs (1)
730return new TestEnvironment(envVars);
Commands\DeployCommandTests.cs (1)
432services.AddSingleton<IEnvironment>(new TestEnvironment(explicitFile
Commands\TypeScriptAppHostToolingCheckTests.cs (1)
262new 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\DotNetBasedAppHostServerChannelResolutionTests.cs (1)
118new TestEnvironment(),
Configuration\PrebuiltAppHostServerChannelResolutionTests.cs (1)
108new TestEnvironment(),
DotNet\DotNetCliRunnerTests.cs (2)
102new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance); 166new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\OwnedProcessExecutionTests.cs (1)
26var factory = new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\ProcessExecutionDetachedTests.cs (1)
126var factory = new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\ProcessExecutionFactoryEnvironmentTests.cs (1)
168=> new(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNet\ProcessExecutionTests.cs (2)
228await using var execution = TestProcessExecutionFactory.CreateForCliGuardian(new TestEnvironment()).CreateExecution( 350var factory = new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance);
DotNetSdkInstallerTests.cs (2)
33var environment = new TestEnvironment(); 308environment ??= new TestEnvironment();
Git\GitRepositoryTests.cs (1)
148return new GitRepository(workspace.CreateExecutionContext(), new TestEnvironment(), loggerFactory.CreateLogger<GitRepository>(), profilingTelemetry);
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)
45var 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 (26)
96new TestEnvironment(), 123new TestEnvironment(), 180var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance); 314new TestEnvironment(), 352new TestEnvironment(), 378new TestEnvironment(), 416new TestEnvironment(), 460new TestEnvironment(), 489new TestEnvironment(), 619var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance); 706var client = new NuGetClient(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance); 750new TestEnvironment(), 855new TestEnvironment(), 915new TestEnvironment(), 963new TestEnvironment(), 1018new TestEnvironment(), 1074new TestEnvironment(), 1137new TestEnvironment(), 1200new TestEnvironment(), 1253new TestEnvironment(), 1309new TestEnvironment(), 1372new TestEnvironment(), 1431new TestEnvironment(), 1497new TestEnvironment(), 1517new TestEnvironment(), 1537new TestEnvironment(),
NuGet\NuGetConfigurationQueryTests.cs (1)
292new TestEnvironment(),
NuGet\NuGetPackageOperationConfigurationTests.cs (1)
232new 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 (4)
30var projector = new AppHostConfigurationProjector(configurationService, new TestEnvironment()); 49var projector = new AppHostConfigurationProjector(configurationService, new TestEnvironment()); 64var environment = new TestEnvironment(new Dictionary<string, string?> 84var 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)
565return new ProcessExecutionFactory(new TestEnvironment(), NullLogger<ProcessExecutionFactory>.Instance) 642new TestEnvironment(), 665new 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)
200new TestEnvironment(),
Projects\GuestAppHostProjectTests.cs (1)
2549var effectiveEnvironment = environment ?? new TestEnvironment();
Projects\GuestRuntimeTests.cs (3)
29processExecutionFactory: TestProcessExecutionFactory.CreateForCliGuardian(new TestEnvironment())); 39new TestEnvironment(), 41TestProcessExecutionFactory.CreateForCliGuardian(new TestEnvironment()),
Projects\NativeAppHostServerProjectTests.cs (3)
34var factory = CreateFactory(new TestEnvironment(new Dictionary<string, string?> 51var factory = CreateFactory(new TestEnvironment(), new NullBundleService(), new TestProcessExecutionFactory()); 93var factory = CreateFactory(new TestEnvironment(new Dictionary<string, string?>
Projects\PrebuiltAppHostServerTests.cs (7)
263new TestEnvironment(), 1394new TestEnvironment(), 2294new TestEnvironment(), 3174new TestEnvironment(), 4470new TestEnvironment(), 4929new TestEnvironment(), 4941new TestEnvironment(),
Projects\ProcessGuestLauncherTests.cs (1)
27processExecutionFactory: processExecutionFactory ?? TestProcessExecutionFactory.CreateForCliGuardian(new TestEnvironment()));
Projects\ProjectLocatorTests.cs (5)
3023var projectLocator = CreateProjectLocator(executionContext, projectFactory: projectFactory, environment: new TestEnvironment(envVars)); 3091var projectLocator = CreateProjectLocator(executionContext, projectFactory: projectFactory, environment: new TestEnvironment(envVars)); 3131var projectLocator = CreateProjectLocator(executionContext, projectFactory: projectFactory, environment: new TestEnvironment(envVars)); 4265environment ?? new TestEnvironment(), 4272environment ?? 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\ScaffoldingServiceTests.cs (1)
165new 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)
45=> new(new TestFeatures(), new TestEnvironment(), NullLogger<NuGetClient>.Instance)
Utils\ContainerRuntimeCheckTests.cs (3)
163var environment = new TestEnvironment(new Dictionary<string, string?> 189var check = new ContainerRuntimeCheck(NullLogger<ContainerRuntimeCheck>.Instance, new TestEnvironment()); 203var 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 (3)
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(variables) { ReportRuntimeIdentifier = "osx-arm64", ReportIsWindows = false, ReportIsLinux = false, ReportIsMacOS = true };
212 references to TestEnvironment
Aspire.Cli.Tests (212)
Acquisition\IdentityResolverTests.cs (1)
561var environment = new TestEnvironment(environmentVariables);
Acquisition\InstallSourceDetectorTests.cs (23)
27var environment = TestEnvironment.CreateWindows(new Dictionary<string, string?> 49var detector = CreateDetector(Path.Combine(workspace.Path, "aspire"), TestEnvironment.CreateLinux()); 61var detector = CreateDetector(processPath, TestEnvironment.CreateLinux()); 70var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 87var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 111var detector = CreateDetector(processPath, TestEnvironment.CreateWindows(), registry); 125var detector = CreateDetector(Path.Combine(workspace.Path, "aspire"), TestEnvironment.CreateLinux(), registry); 138var detector = CreateDetector(Path.Combine(workspace.Path, "aspire.exe"), TestEnvironment.CreateWindows(), registry); 162var detector = CreateDetector(processPath, TestEnvironment.CreateLinux()); 179var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 204var environment = TestEnvironment.CreateMacOS(new Dictionary<string, string?> 219var environment = windows ? TestEnvironment.CreateWindows() : TestEnvironment.CreateLinux(); 238var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 254var detector = CreateDetector(processPath, TestEnvironment.CreateLinux()); 270var detector = CreateDetector(linkPath, TestEnvironment.CreateLinux());
Agents\AgentTelemetryHookTests.cs (1)
40var environment = new TestEnvironment(new Dictionary<string, string?>
Agents\CopilotAgentEnvironmentScannerTests.cs (1)
50var environment = new TestEnvironment(new Dictionary<string, string?> { ["TERM_PROGRAM"] = "vscode" });
Agents\CopilotAppInstallationDetectorTests.cs (11)
22var environment = TestEnvironment.CreateWindows(new Dictionary<string, string?> 38Assert.Equal(appBundlePath, CreateDetector(TestEnvironment.CreateMacOS(), workspace).GetInstallationMarker()); 45var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 74CreateDetector(TestEnvironment.CreateLinux(), workspace).GetInstallationMarker()); 81var detector = CreateDetector(TestEnvironment.CreateLinux(), workspace); 100var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 126var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?>
Agents\TelemetryHookConfiguratorTests.cs (1)
388var environment = new TestEnvironment(environmentVariables);
Agents\TelemetryHookScriptTests.cs (1)
541var nativeEnvironment = new TestEnvironment(environment);
Agents\VsCodeAgentEnvironmentScannerTests.cs (1)
118var environment = new TestEnvironment(new Dictionary<string, string?> { ["TERM_PROGRAM"] = "vscode" });
Backchannel\AppHostCliBackchannelTests.cs (2)
19var environment = new TestEnvironment(new Dictionary<string, string?> 54var environment = new TestEnvironment(new Dictionary<string, string?>
Certificates\CertificateServiceTests.cs (10)
90}, nonInteractive: false, environment: TestEnvironment.CreateLinux( 118}, nonInteractive: true, environment: TestEnvironment.CreateLinux( 206services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 361services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 402services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 446return new CertificateService(toolRunner, interactiveService, telemetry, hostEnvironment, TestEnvironment.CreateLinux(), executionContext, logger); 493services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 531services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 577services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows(envVars)); 611services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows());
Certificates\NativeCertificateToolRunnerTests.cs (1)
134TestEnvironment.CreateLinux(),
Certificates\UnixCertificateManagerTests.cs (18)
215var environment = TestEnvironment.CreateLinux(); 250var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 417var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 463var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 497var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 532var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 567var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 602var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 677var environment = TestEnvironment.CreateLinux(variables);
CliBootstrapTests.cs (3)
363var environment = new TestEnvironment(); 397var environment = new TestEnvironment(envVars); 419var environment = new TestEnvironment();
Commands\AgentInitClientSelectionTests.cs (15)
493var environment = new TestEnvironment(); 646var environment = new TestEnvironment(); 694var environment = new TestEnvironment(); 748var environment = new TestEnvironment(); 827var environment = new TestEnvironment(); 878var environment = new TestEnvironment(); 918var environment = new TestEnvironment(new Dictionary<string, string?> { [variable] = value }); 938var environment = new TestEnvironment(new Dictionary<string, string?> 980var environment = new TestEnvironment(new Dictionary<string, string?> { ["OPENCODE_CONFIG"] = path }); 1010var environment = new TestEnvironment(new Dictionary<string, string?> { ["OPENCODE_CONFIG"] = path }); 1039var environment = new TestEnvironment(); 1092var environment = new TestEnvironment(); 1125var environment = new TestEnvironment(); 1154var environment = new TestEnvironment(); 1192var environment = new TestEnvironment();
Commands\CertificatesCommandTests.cs (1)
105return new CertificateService(toolRunner, interactionService, telemetry, hostEnvironment, TestEnvironment.CreateLinux(), executionContext, logger);
Commands\CompletionsCommandTests.cs (3)
50var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> { ["SHELL"] = shellPath }); 58Assert.Equal("pwsh", CompletionScripts.DetectShell(TestEnvironment.CreateWindows()));
Commands\TrayCommandTests.cs (6)
208"linux" => TestEnvironment.CreateLinux(), 209"macos" => TestEnvironment.CreateMacOS(), 210_ => TestEnvironment.CreateWindows() 224services.AddSingleton<IEnvironment>(TestEnvironment.CreateLinux()); 561services.AddSingleton<IEnvironment>(TestEnvironment.CreateMacOS()); 567services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows());
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?>
Commands\WslEnvironmentCheckTests.cs (9)
292var check = new WslEnvironmentCheck(TestEnvironment.CreateMacOS(), () => Wsl1Banner); 330var check = new WslEnvironmentCheck(TestEnvironment.CreateLinux(), () => procVersion); 340var check = new WslEnvironmentCheck(TestEnvironment.CreateLinux(), () => procVersion); 350var check = new WslEnvironmentCheck(TestEnvironment.CreateLinux(), () => procVersion); 372var check = new WslEnvironmentCheck(TestEnvironment.CreateLinux(), () => Wsl1Banner); 383var check = new WslEnvironmentCheck(TestEnvironment.CreateLinux(), () => HistoricalWsl1Banner); 541private static TestEnvironment CreateLinuxEnvironment(string? distroName, string? wslInterop = null) 545return TestEnvironment.CreateLinux(); 560return TestEnvironment.CreateLinux(environmentVariables);
DotNetSdkInstallerTests.cs (1)
33var environment = new TestEnvironment();
Layout\TrayLayoutTests.cs (2)
45var environment = new TestEnvironment(new Dictionary<string, string?> 87await BundleService.ExtractPayloadAsync(payload, extracted, TestEnvironment.CreateWindows(), CancellationToken.None);
NuGet\NuGetClientTests.cs (3)
530var client = new NuGetClient(new TestFeatures(), TestEnvironment.CreateLinux(), NullLogger<NuGetClient>.Instance); 560var client = new NuGetClient(new TestFeatures(), TestEnvironment.CreateLinux(), NullLogger<NuGetClient>.Instance); 592var client = new NuGetClient(new TestFeatures(), TestEnvironment.CreateLinux(), NullLogger<NuGetClient>.Instance);
NuGet\NuGetSignatureVerificationEnablerTests.cs (10)
118using (NuGetSignatureVerificationEnabler.ApplyToCurrentProcess(new TestFeatures(), TestEnvironment.CreateLinux())) 133var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 154var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 175var environment = TestEnvironment.CreateLinux(); 195var environment = TestEnvironment.CreateLinux(); 218using (NuGetSignatureVerificationEnabler.ApplyToCurrentProcess(features, TestEnvironment.CreateLinux()))
Processes\ProcessTreeGracefulShutdownServiceTests.cs (1)
245environment: TestEnvironment.CreateWindows());
ProgramTests.cs (3)
44var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 87TestEnvironment.CreateWindows(),
Projects\AppHostConfigurationProjectorTests.cs (1)
64var environment = new TestEnvironment(new Dictionary<string, string?>
Projects\DotNetAppHostProjectTests.cs (4)
573var environment = new TestEnvironment(new Dictionary<string, string?> 641var inheritedEnvironment = useExplicitOverlay 1265var environment = new TestEnvironment(new Dictionary<string, string?> 1316var environment = new TestEnvironment(new Dictionary<string, string?>
Projects\GuestAppHostProjectTests.cs (4)
2655var project = CreateGuestAppHostProject(environment: TestEnvironment.CreateWindows()); 2686var project = CreateGuestAppHostProject(environment: TestEnvironment.CreateMacOS()); 2741var environment = TestEnvironment.CreateWindows(new Dictionary<string, string?>
Projects\NativeAppHostServerProjectTests.cs (1)
523private static AppHostServerProjectFactory CreateFactory(TestEnvironment environment, IBundleService bundle,
Projects\TypeScriptAppHostToolchainResolverTests.cs (3)
316TestEnvironment.CreateWindows(), 329TestEnvironment.CreateMacOS(), 342TestEnvironment.CreateLinux(),
Telemetry\AspireCliTelemetryTests.cs (2)
829var environment = new TestEnvironment(environmentVariables.ToDictionary(variable => variable.Item1, variable => variable.Item2, StringComparer.Ordinal)); 841var environment = new TestEnvironment(new Dictionary<string, string?>(comparer)
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 (6)
1131var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 1162var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 1714TestEnvironment? environment = null, 1722var effectiveEnvironment = environment ?? new TestEnvironment(environmentVariables);
Utils\CliTestHelper.cs (1)
233services.AddSingleton<IEnvironment, TestEnvironment>();
Utils\ContainerRuntimeCheckTests.cs (5)
163var environment = new TestEnvironment(new Dictionary<string, string?> 203var environment = new TestEnvironment(new Dictionary<string, string?> { [variableName] = configuredRuntime }); 223var environment = os == "linux" ? TestEnvironment.CreateLinux(variables) : TestEnvironment.CreateMacOS(variables);
Utils\DeprecatedWorkloadCheckTests.cs (1)
18var environment = new TestEnvironment();
Utils\DevCertsCheckTests.cs (32)
341var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 376var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 422var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 466var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 517var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 572var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 622var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 681var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 738var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 779var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 823var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 869var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 915var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 961var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 1004var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 1040var environment = TestEnvironment.CreateMacOS(new Dictionary<string, string?>
Utils\EnvironmentVariableExtensionsTests.cs (1)
21var environment = new TestEnvironment(new Dictionary<string, string?>
Utils\TestEnvironment.cs (3)
50public static TestEnvironment CreateWindows(IReadOnlyDictionary<string, string?>? variables = null) 53public static TestEnvironment CreateLinux(IReadOnlyDictionary<string, string?>? variables = null) 56public static TestEnvironment CreateMacOS(IReadOnlyDictionary<string, string?>? variables = null)