2 implementations of Eventing
Aspire.Hosting.Testing (2)
143 references to Eventing
Aspire.Hosting.Azure.Tests (7)
Aspire.Hosting.DevTunnels.Tests (2)
Aspire.Hosting.Dotnet.Tests (19)
Aspire.Hosting.EntityFrameworkCore.Tests (2)
Aspire.Hosting.Foundry.Tests (1)
Aspire.Hosting.Java.Tests (16)
Aspire.Hosting.Kafka.Tests (4)
Aspire.Hosting.Keycloak.Tests (1)
Aspire.Hosting.Maui.Tests (3)
Aspire.Hosting.MongoDB.Tests (12)
AddMongoDBTests.cs (10)
140await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
170await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
469await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
494await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
520await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
541await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
579await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
620await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
640await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
658await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
Aspire.Hosting.MySql.Tests (1)
Aspire.Hosting.Qdrant.Tests (1)
Aspire.Hosting.Redis.Tests (3)
Aspire.Hosting.SqlServer.Tests (2)
Aspire.Hosting.Tests (67)
Eventing\DistributedApplicationBuilderEventingTests.cs (22)
27builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) =>
34builder.Eventing.Subscribe<DummyEvent>((@event, ct) =>
40var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingSequential);
59builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) =>
66builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) =>
73var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingConcurrent);
91builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) =>
98builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) =>
105await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingConcurrent).DefaultTimeout();
124builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) =>
133builder.Eventing.Subscribe<DummyEvent>((@event, ct) =>
140await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingSequential).DefaultTimeout();
173Assert.Equal(builder.Eventing, eventing);
211builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) =>
236builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
244builder.Eventing.Subscribe<AfterEndpointsAllocatedEvent>((e, ct) =>
252builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) =>
281builder.Eventing.Subscribe<AfterEndpointsAllocatedEvent>((e, ct) => Task.CompletedTask);
396builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) =>
492builder.Eventing.Subscribe<IDistributedApplicationEvent>((_, _) => Task.CompletedTask));
504builder.Eventing.Subscribe<AbstractDummyEvent>((_, _) => Task.CompletedTask));
517builder.Eventing.Subscribe<IDistributedApplicationResourceEvent>(resource.Resource, (_, _) => Task.CompletedTask));
WithTerminalTests.cs (14)
344await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
399await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
435await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
513await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
603await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
655await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
1051await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
1067await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
1085await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
1415await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
1437await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
1462await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
1484await Assert.ThrowsAsync<IOException>(async () => await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)));
1537await cleanupService.SubscribeAsync(builder.Eventing, executionContext, CancellationToken.None);
Aspire.Hosting.Yarp.Tests (2)