Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eventing to test builder. #6682

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Reflection;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Eventing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down Expand Up @@ -170,6 +171,8 @@ private sealed class Builder(SuspendingDistributedApplicationFactory factory, Di

public IResourceCollection Resources => innerBuilder.Resources;

public IDistributedApplicationEventing Eventing => innerBuilder.Eventing;

public IResourceBuilder<T> AddResource<T>(T resource) where T : IResource => innerBuilder.AddResource(resource);

public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken)
Expand Down Expand Up @@ -261,6 +264,11 @@ public interface IDistributedApplicationTestingBuilder
/// </summary>
DistributedApplicationExecutionContext ExecutionContext { get; }

/// <summary>
/// Eventing infrastructure for AppHost lifecycle.
/// </summary>
IDistributedApplicationEventing Eventing { get; }

/// <summary>
/// Gets the collection of resources for the distributed application.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/Aspire.Hosting.Testing/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#nullable enable
Aspire.Hosting.Testing.DistributedApplicationFactory.DistributedApplicationFactory(System.Type! entryPoint, string![]! args) -> void
Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder.AppHostAssembly.get -> System.Reflection.Assembly?
Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder.Eventing.get -> Aspire.Hosting.Eventing.IDistributedApplicationEventing!
static Aspire.Hosting.Testing.DistributedApplicationTestingBuilder.CreateAsync(System.Type! entryPoint, string![]! args, System.Action<Aspire.Hosting.DistributedApplicationOptions!, Microsoft.Extensions.Hosting.HostApplicationBuilderSettings!>! configureBuilder, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder!>!
static Aspire.Hosting.Testing.DistributedApplicationTestingBuilder.CreateAsync(System.Type! entryPoint, string![]! args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder!>!
static Aspire.Hosting.Testing.DistributedApplicationTestingBuilder.CreateAsync<TEntryPoint>(string![]! args, System.Action<Aspire.Hosting.DistributedApplicationOptions!, Microsoft.Extensions.Hosting.HostApplicationBuilderSettings!>! configureBuilder, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder!>!
Expand Down