mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
642 B
21 lines
642 B
using System.Threading.Tasks;
|
|
using Shouldly;
|
|
using Xunit;
|
|
|
|
namespace Volo.Abp.EventBus
|
|
{
|
|
public class EventBus_DI_Services_Test : EventBusTestBase
|
|
{
|
|
[Fact]
|
|
public async Task Should_Automatically_Register_EventHandlers_From_Services()
|
|
{
|
|
await EventBus.TriggerAsync(new MySimpleEventData(1));
|
|
await EventBus.TriggerAsync(new MySimpleEventData(2));
|
|
await EventBus.TriggerAsync(new MySimpleEventData(3));
|
|
await EventBus.TriggerAsync(new MySimpleEventData(4));
|
|
|
|
GetRequiredService<MySimpleEventDataHandler>().TotalData.ShouldBe(10);
|
|
}
|
|
}
|
|
}
|