public void HandlerIsCalledWhenHandlerIsProtectedAndEventIsApplied() { var domainEvent = new AggregateRootProtectedHandlerThatMeetsConventionEvent(); var aggregateRoot = new MyAggregateRoot(); aggregateRoot.Apply(domainEvent); Assert.IsTrue(aggregateRoot.OnAggregateRootProtectedHandlerThatMeetsConventionCalled); }
protected void OnAggregateRootProtectedHandlerThatMeetsConvention(AggregateRootProtectedHandlerThatMeetsConventionEvent domainEvent) { OnAggregateRootProtectedHandlerThatMeetsConventionCalled = true; }