293 instantiations of 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 };
230 references to TestEnvironment
Aspire.Cli.Tests (230)
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\AgentConfigurationTestContext.cs (2)
38Environment = TestEnvironment.CreateWindows(_variables); 49public TestEnvironment Environment { get; }
Agents\AgentTelemetryHookTests.cs (1)
60var 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)
391var environment = new TestEnvironment(environmentVariables);
Agents\TelemetryHookScriptTests.cs (1)
550var nativeEnvironment = new TestEnvironment(environment);
Agents\VsCodeAgentEnvironmentScannerTests.cs (1)
118var environment = new TestEnvironment(new Dictionary<string, string?> { ["TERM_PROGRAM"] = "vscode" });
Backchannel\AppHostCliBackchannelTests.cs (2)
21var environment = new TestEnvironment(new Dictionary<string, string?> 127var environment = new TestEnvironment(new Dictionary<string, string?>
Certificates\CertificateFactoryTests.cs (1)
99var manager = CertificateManager.Create(NullLogger.Instance, TestEnvironment.CreateLinux(), nssDbOverride: null);
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)
360var environment = new TestEnvironment(); 394var environment = new TestEnvironment(envVars); 416var environment = new TestEnvironment();
Commands\AgentInitClientSelectionTests.cs (15)
641var environment = new TestEnvironment(); 794var environment = new TestEnvironment(); 844var environment = new TestEnvironment(); 899var environment = 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\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 (10)
31services.AddSingleton<IEnvironment>(TestEnvironment.CreateLinux()); 52services.AddSingleton<IEnvironment>(TestEnvironment.CreateLinux()); 76services.AddSingleton<IEnvironment>(TestEnvironment.CreateLinux()); 273"linux" => TestEnvironment.CreateLinux(), 274"linux-musl" => TestEnvironment.CreateLinuxMusl(), 275"macos" => TestEnvironment.CreateMacOS(), 276_ => TestEnvironment.CreateWindows() 290services.AddSingleton<IEnvironment>(TestEnvironment.CreateLinuxMusl()); 627services.AddSingleton<IEnvironment>(TestEnvironment.CreateMacOS()); 633services.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);
Configuration\ConfigSourceServiceTests.cs (9)
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?> 903var environment = 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?>
DotNetSdkInstallerTests.cs (1)
33var environment = new TestEnvironment();
Layout\TrayLayoutTests.cs (3)
46var environment = new TestEnvironment(new Dictionary<string, string?> 88await BundleService.ExtractPayloadAsync(payload, extracted, TestEnvironment.CreateLinux(), CancellationToken.None); 114await BundleService.ExtractPayloadAsync(payload, extracted, TestEnvironment.CreateWindows(), CancellationToken.None);
NuGet\NuGetClientTests.cs (3)
790var client = new NuGetClient(new TestFeatures(), TestEnvironment.CreateLinux(), NullLogger<NuGetClient>.Instance); 820var client = new NuGetClient(new TestFeatures(), TestEnvironment.CreateLinux(), NullLogger<NuGetClient>.Instance); 852var 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)
67var environment = TestEnvironment.CreateLinux(new Dictionary<string, string?> 110TestEnvironment.CreateWindows(),
Projects\AppHostConfigurationProjectorTests.cs (1)
63var 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)
2684var project = CreateGuestAppHostProject(environment: TestEnvironment.CreateWindows()); 2715var project = CreateGuestAppHostProject(environment: TestEnvironment.CreateMacOS()); 2770var environment = TestEnvironment.CreateWindows(new Dictionary<string, string?>
Projects\NativeAppHostServerProjectTests.cs (1)
532private 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)
247services.AddSingleton<IEnvironment, TestEnvironment>();
Utils\ContainerRuntimeCheckTests.cs (5)
167var environment = new TestEnvironment(new Dictionary<string, string?> 207var environment = new TestEnvironment(new Dictionary<string, string?> { [variableName] = configuredRuntime }); 227var 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 (4)
50public static TestEnvironment CreateWindows(IReadOnlyDictionary<string, string?>? variables = null) 53public static TestEnvironment CreateLinux(IReadOnlyDictionary<string, string?>? variables = null) 56public static TestEnvironment CreateLinuxMusl() 59public static TestEnvironment CreateMacOS(IReadOnlyDictionary<string, string?>? variables = null)