4 instantiations of BuildEnvironment
Aspire.Workload.Tests (4)
BuildAndRunTemplateTests.cs (1)
132var testSpecificBuildEnvironment = new BuildEnvironment(BuildEnvironment.ForDefaultFramework);
tests\Shared\WorkloadTesting\BuildEnvironment.cs (3)
39new BuildEnvironment( 44new BuildEnvironment( 49new BuildEnvironment(
48 references to BuildEnvironment
Aspire.Workload.Tests (48)
AppHostTemplateTests.cs (1)
25BuildEnvironment.ForDefaultFramework,
BuildAndRunTemplateTests.cs (6)
37buildEnvironment: BuildEnvironment.ForDefaultFramework, 49await using var project = await AspireProject.CreateNewTemplateProjectAsync(id, "aspire", _testOutput, buildEnvironment: BuildEnvironment.ForDefaultFramework); 66await using var project = await AspireProject.CreateNewTemplateProjectAsync(id, "aspire", _testOutput, buildEnvironment: BuildEnvironment.ForDefaultFramework); 121buildEnvironment: BuildEnvironment.ForDefaultFramework); 132var testSpecificBuildEnvironment = new BuildEnvironment(BuildEnvironment.ForDefaultFramework);
NewUpAndBuildStandaloneTemplateTests.cs (4)
18var buildEnvToUse = sdk switch 20TestSdk.Current => BuildEnvironment.ForCurrentSdkOnly, 21TestSdk.Previous => BuildEnvironment.ForPreviousSdkOnly, 22TestSdk.CurrentSdkAndPreviousRuntime => BuildEnvironment.ForCurrentSdkAndPreviousRuntime,
NewUpAndBuildSupportProjectTemplatesTests.cs (4)
22var buildEnvToUse = sdk switch 24TestSdk.Current => BuildEnvironment.ForCurrentSdkOnly, 25TestSdk.Previous => BuildEnvironment.ForPreviousSdkOnly, 26TestSdk.CurrentSdkAndPreviousRuntime => BuildEnvironment.ForCurrentSdkAndPreviousRuntime,
PerTestFrameworkTemplatesTests.cs (1)
38buildEnvironment: BuildEnvironment.ForDefaultFramework);
StarterTemplateProjectNamesTests.cs (1)
40BuildEnvironment.ForDefaultFramework,
TemplateAppFixture.cs (1)
43buildEnvironment: BuildEnvironment.ForDefaultFramework,
tests\Shared\WorkloadTesting\AspireProject.cs (9)
22Path.Combine(BuildEnvironment.TestAssetsPath, "nuget8.config"); 39private readonly BuildEnvironment _buildEnv; 41public AspireProject(string id, string baseDir, ITestOutputHelper testOutput, BuildEnvironment buildEnv, TestTargetFramework? tfm = default) 48TargetFramework = tfm ?? BuildEnvironment.DefaultTargetFramework; 75BuildEnvironment buildEnvironment, 81string rootDir = Path.Combine(BuildEnvironment.TestRootPath, id); 82string logPath = Path.Combine(BuildEnvironment.ForDefaultFramework.LogRootPath, id); 85var tfmToUse = targetFramework ?? BuildEnvironment.DefaultTargetFramework; 133File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
tests\Shared\WorkloadTesting\BuildEnvironment.cs (8)
38private static readonly Lazy<BuildEnvironment> s_instance_80 = new(() => 43private static readonly Lazy<BuildEnvironment> s_instance_90 = new(() => 48private static readonly Lazy<BuildEnvironment> s_instance_90_80 = new(() => 53public static BuildEnvironment ForPreviousSdkOnly => s_instance_80.Value; 54public static BuildEnvironment ForCurrentSdkOnly => s_instance_90.Value; 55public static BuildEnvironment ForCurrentSdkAndPreviousRuntime => s_instance_90_80.Value; 57public static BuildEnvironment ForDefaultFramework { get; } = DefaultTargetFramework switch 252public BuildEnvironment(BuildEnvironment otherBuildEnvironment)
tests\Shared\WorkloadTesting\DotNetCommand.cs (4)
10protected readonly BuildEnvironment _buildEnvironment; 13public DotNetCommand(ITestOutputHelper _testOutput, bool useDefaultArgs = true, BuildEnvironment? buildEnv = null, string label = "") 14: base((buildEnv ?? BuildEnvironment.ForDefaultFramework).DotNet, _testOutput, label) 16_buildEnvironment = buildEnv ?? BuildEnvironment.ForDefaultFramework;
tests\Shared\WorkloadTesting\DotNetNewCommand.cs (1)
15BuildEnvironment? buildEnv = null,
tests\Shared\WorkloadTesting\RunCommand.cs (1)
10public RunCommand(ITestOutputHelper _testOutput, BuildEnvironment? buildEnv = null, string label="") : base(_testOutput, false, buildEnv, label)
tests\Shared\WorkloadTesting\TemplateCustomHive.cs (5)
28var customHiveBaseDirectory = BuildEnvironment.IsRunningOnCI 35public async Task EnsureInstalledAsync(BuildEnvironment buildEnvironment) 37if (BuildEnvironment.IsRunningOnCI && File.Exists(_stampFilePath)) 106.WithWorkingDirectory(BuildEnvironment.IsRunningOnCI 108: Path.Combine(BuildEnvironment.TempDir, "templates", "working")); // avoid running from the repo
WorkloadTestsBase.cs (2)
52BuildEnvironment? buildEnvironment = null, 56buildEnvironment ??= BuildEnvironment.ForDefaultFramework;