File tree 2 files changed +2
-11
lines changed
Tests/Masa.Contrib.Ddd.Domain.Tests
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -8,20 +8,17 @@ public class DomainEventBus : IDomainEventBus
8
8
private readonly IEventBus _eventBus ;
9
9
private readonly IIntegrationEventBus _integrationEventBus ;
10
10
private readonly IUnitOfWork _unitOfWork ;
11
- private readonly DispatcherOptions _options ;
12
11
13
12
private readonly ConcurrentQueue < IDomainEvent > _eventQueue = new ( ) ;
14
13
15
14
public DomainEventBus (
16
15
IEventBus eventBus ,
17
16
IIntegrationEventBus integrationEventBus ,
18
- IUnitOfWork unitOfWork ,
19
- IOptions < DispatcherOptions > options )
17
+ IUnitOfWork unitOfWork )
20
18
{
21
19
_eventBus = eventBus ;
22
20
_integrationEventBus = integrationEventBus ;
23
21
_unitOfWork = unitOfWork ;
24
- _options = options . Value ;
25
22
}
26
23
27
24
public async Task PublishAsync < TEvent > ( TEvent @event , CancellationToken cancellationToken = default ) where TEvent : IEvent
Original file line number Diff line number Diff line change @@ -18,15 +18,9 @@ public void Test()
18
18
_integrationEventBus = new ( ) ;
19
19
_integrationEventBus . Setup ( bus => bus . PublishAsync ( It . IsAny < IIntegrationEvent > ( ) , default ) ) . Verifiable ( ) ;
20
20
Mock < IUnitOfWork > unitOfWork = new ( ) ;
21
- IOptions < DispatcherOptions > options =
22
- Microsoft . Extensions . Options . Options . Create (
23
- new DispatcherOptions (
24
- new ServiceCollection ( ) ,
25
- AppDomain . CurrentDomain . GetAssemblies ( ) ) ) ;
26
21
_domainEventBus = new DomainEventBus ( _eventBus . Object ,
27
22
_integrationEventBus . Object ,
28
- unitOfWork . Object ,
29
- options
23
+ unitOfWork . Object
30
24
) ;
31
25
}
32
26
You can’t perform that action at this time.
0 commit comments