public async Task Test() { var mediator = new MediatorConfiguration() .RegisterHandlers(typeof(TestMultipleEvent1).Assembly) .CreateMediator(); await mediator.PublishAsync(new TestMultipleEvent1()); TestStore.EventStore.Count.ShouldBe(1); await mediator.PublishAsync(new TestMultipleEvent2()); TestStore.EventStore.Count.ShouldBe(2); }
public async Task Test() { var mediator = new MediatorConfiguration() .RegisterHandlers(typeof(TestEvent).Assembly) .CreateMediator(); await mediator.PublishAsync(new TestEvent { Message = "test event" }); TestStore.EventStore.Count.ShouldBe(2); }