示例#1
0
        public void HandlerIsCalledWhenHandlerIsProtectedAndEventIsApplied()
        {
            var domainEvent   = new AggregateRootProtectedHandlerThatMeetsConventionEvent();
            var aggregateRoot = new MyAggregateRoot();

            aggregateRoot.Apply(domainEvent);

            Assert.IsTrue(aggregateRoot.OnAggregateRootProtectedHandlerThatMeetsConventionCalled);
        }
        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;
 }
示例#4
0
 protected void OnAggregateRootProtectedHandlerThatMeetsConvention(AggregateRootProtectedHandlerThatMeetsConventionEvent domainEvent)
 {
     OnAggregateRootProtectedHandlerThatMeetsConventionCalled = true;
 }