Skip to content

Commit

Permalink
Add eventing to test builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdenny committed Nov 14, 2024
1 parent 9abbb30 commit 7b86588
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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

0 comments on commit 7b86588

Please sign in to comment.