103 references to DistributedApplicationTestingBuilder
Aspire.Hosting.Testing (4)
DistributedApplicationEntryPointInvoker.cs (4)
46$"If the AppHost is discovered dynamically, load its assembly and pass a type from that assembly to {nameof(DistributedApplicationTestingBuilder)}.{nameof(DistributedApplicationTestingBuilder.CreateAsync)}(Type)."); 54$"{nameof(DistributedApplicationTestingBuilder)}.{nameof(DistributedApplicationTestingBuilder.Create)} to construct the application without invoking an entry point.");
Aspire.Hosting.Testing.Tests (83)
DashboardTestingBuilderTests.cs (17)
36using var builder = DistributedApplicationTestingBuilder.Create(); 102var builder = DistributedApplicationTestingBuilder.Create(CreateDashboardOptions(), []); 139() => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(null!, [])); 141() => DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), null!, [])); 142Assert.Throws<ArgumentNullException>(() => DistributedApplicationTestingBuilder.Create(null!, [])); 148Assert.Throws<ArgumentNullException>(() => DistributedApplicationTestingBuilder.Create(default!)); 151await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(default); 153await DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), default); 159await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>( 164await DistributedApplicationTestingBuilder.CreateAsync( 203await using var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>( 307CreationSurface.Generic => await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(options, args), 308CreationSurface.Type => await DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), options, args), 309CreationSurface.AdHoc => DistributedApplicationTestingBuilder.Create(options, args), 321CreationSurface.Generic => await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>( 324CreationSurface.Type => await DistributedApplicationTestingBuilder.CreateAsync( 328CreationSurface.AdHoc => DistributedApplicationTestingBuilder.Create(options, args),
DashboardUrlTests.cs (4)
239var builder = DistributedApplicationTestingBuilder.Create(); 288var builder = DistributedApplicationTestingBuilder.Create(["--publisher", "manifest"]); 305var builder = DistributedApplicationTestingBuilder.Create( 362return DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(
DistributedApplicationEntryPointInvokerTests.cs (4)
26$"If the AppHost is discovered dynamically, load its assembly and pass a type from that assembly to {nameof(DistributedApplicationTestingBuilder)}.{nameof(DistributedApplicationTestingBuilder.CreateAsync)}(Type).", 44$"{nameof(DistributedApplicationTestingBuilder)}.{nameof(DistributedApplicationTestingBuilder.Create)} to construct the application without invoking an entry point.",
ResourceLoggerForwarderServiceTests.cs (1)
21var appHost = await DistributedApplicationTestingBuilder.CreateAsync<TestingAppHost1_AppHost>();
TestingBuilderTests.cs (36)
44? await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>() 45: DistributedApplicationTestingBuilder.Create(); 82var builder = await DistributedApplicationTestingBuilder.CreateAsync(appHostType, ["--skip-resources", resourcesToSkip.ToCSVString()]); 98var ioe = await Assert.ThrowsAsync<InvalidOperationException>(() => DistributedApplicationTestingBuilder.CreateAsync(typeof(Microsoft.Extensions.Logging.ConsoleLoggerExtensions))); 117? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>([], configureBuilder) 118: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), [], configureBuilder)); 138var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(["--environment=Testing"]); 145var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(); 152await using var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(); 171? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>() 172: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost))); 195? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>() 196: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost))); 213? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>() 214: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost))); 239? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>() 240: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost))); 268builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder); 272builder = await DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), args, configureBuilder); 304builder = DistributedApplicationTestingBuilder.Create(["APP_HOST_ARG=42"]); 308builder = DistributedApplicationTestingBuilder.Create([], (dao, habs) => habs.Args = ["APP_HOST_ARG=42"]); 359var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder); 408var builder = DistributedApplicationTestingBuilder.Create(args, configureBuilder); 442? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>() 443: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost))); 458? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>() 459: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost))); 501genericEntryPoint ? DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>([$"--crash-{crashArg}"], cts.Token).WaitAsync(cts.Token) 502: DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), [$"--crash-{crashArg}"], cts.Token).WaitAsync(cts.Token)); 509? await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>([$"--crash-{crashArg}"], cts.Token).WaitAsync(cts.Token) 510: await DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), [$"--crash-{crashArg}"], cts.Token).WaitAsync(cts.Token); 544using var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(["--add-unknown-container"], cts.Token).WaitAsync(cts.Token); 565var builder = await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>( 614var builder = DistributedApplicationTestingBuilder.Create([], (options, _) => 639var builder = DistributedApplicationTestingBuilder.Create([], (opt, _) => 665var builder = DistributedApplicationTestingBuilder.Create([], (opt, _) =>
TestingFactoryCrashTests.cs (2)
69? await DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, cts.Token).WaitAsync(cts.Token) 70: await DistributedApplicationTestingBuilder.CreateAsync(typeof(Projects.TestingAppHost1_AppHost), args, cts.Token).WaitAsync(cts.Token);
TestingPublicApiTests.cs (19)
205var builder = DistributedApplicationTestingBuilder.Create(); 228var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint); 239var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args); 252var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args); 270var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args); 282var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args); 296var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args); 314var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder); 326var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder); 340var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder); 359var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder); 372var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder); 385var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder); 400var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder); 417var action = () => DistributedApplicationTestingBuilder.Create(args); 430var action = () => DistributedApplicationTestingBuilder.Create(args); 448var action = () => DistributedApplicationTestingBuilder.Create(args, configureBuilder); 460var action = () => DistributedApplicationTestingBuilder.Create(args, configureBuilder); 474var action = () => DistributedApplicationTestingBuilder.Create(args, configureBuilder);
Aspire.Hosting.Tests (1)
ExpressionResolverTests.cs (1)
326var builder = DistributedApplicationTestingBuilder.Create();
Aspire.Hosting.TestUtilities (1)
Utils\TestDistributedApplicationBuilder.cs (1)
70var builder = DistributedApplicationTestingBuilder.Create(args, (applicationOptions, hostBuilderOptions) => configureOptions?.Invoke(applicationOptions));
Aspire.Playground.Tests (2)
BlazorWasmHostingTests.cs (1)
198var builder = await DistributedApplicationTestingBuilder.CreateAsync(appHostType, [], (options, _) =>
Infrastructure\DistributedApplicationTestFactory.cs (1)
21var builder = await DistributedApplicationTestingBuilder.CreateAsync(appHostProgramType);
Testing.Tests (12)
WaitFailures.cs (12)
26await using var builder = DistributedApplicationTestingBuilder.Create(); 41await using var builder = DistributedApplicationTestingBuilder.Create(); 59await using var builder = DistributedApplicationTestingBuilder.Create(); 79await using var builder = DistributedApplicationTestingBuilder.Create(); 94await using var builder = DistributedApplicationTestingBuilder.Create(); 109await using var builder = DistributedApplicationTestingBuilder.Create(); 127await using var builder = DistributedApplicationTestingBuilder.Create(); 143await using var builder = DistributedApplicationTestingBuilder.Create(); 166await using var builder = DistributedApplicationTestingBuilder.Create(); 190await using var builder = DistributedApplicationTestingBuilder.Create(); 214await using var builder = DistributedApplicationTestingBuilder.Create(); 240await using var builder = DistributedApplicationTestingBuilder.Create();