kvnallen
11/25/2016 - 12:17 AM

MockDomainEvents

MockDomainEvents

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