Exemplo n.º 1
0
        public void HandlerIsCalledWhenHandlerIsProtectedAndEventIsApplied()
        {
            var domainEvent   = new AggregateRootProtectedHandlerThatMeetsConventionEvent();
            var aggregateRoot = new MyAggregateRoot();

            aggregateRoot.Apply(domainEvent);

            Assert.IsTrue(aggregateRoot.OnAggregateRootProtectedHandlerThatMeetsConventionCalled);
        }
Exemplo n.º 2
0
        public void HandlerIsCalledWhenHandlerIsProtectedAndEventIsApplied()
        {
            var domainEvent = new AggregateRootProtectedHandlerThatMeetsConventionEvent();
            var aggregateRoot = new MyAggregateRoot();

            aggregateRoot.Apply(domainEvent);

            Assert.IsTrue(aggregateRoot.OnAggregateRootProtectedHandlerThatMeetsConventionCalled);
        }
Exemplo n.º 3
0
 protected void OnAggregateRootProtectedHandlerThatMeetsConvention(AggregateRootProtectedHandlerThatMeetsConventionEvent domainEvent)
 {
     OnAggregateRootProtectedHandlerThatMeetsConventionCalled = true;
 }
Exemplo n.º 4
0
 protected void OnAggregateRootProtectedHandlerThatMeetsConvention(AggregateRootProtectedHandlerThatMeetsConventionEvent domainEvent)
 {
     OnAggregateRootProtectedHandlerThatMeetsConventionCalled = true;
 }