MockDomainEvents
var containerMock = new Mock<IContainer>(); var handler = new DomainNotificationHandler(); containerMock.Setup(x => x.GetService(typeof(IHandler<DomainNotification>))).Returns(handler); DomainEvent.Container = containerMock.Object;