Exemple #1
0
        public void HandlerIsNotCalledWhenHandlerDoesNotMeetTheConventionAndEventIsApplied()
        {
            var domainEvent = new EntityHandlerThatMeetsConventionEvent();
            var entity = mockEntity.Object;
            entity.TurnTestModeOn();

            entity.Apply(domainEvent);

            mockEntity.Verify(ar => ar.OnEntityHandlerThatDoesNotMeetsConvention(domainEvent), Times.Never());
        }
Exemple #2
0
        public void HandlerIsNotCalledWhenHandlerHasTwoParametersAndEventIsApplied()
        {
            var domainEvent = new EntityHandlerThatMeetsConventionEvent();
            var entity      = mockEntity.Object;

            entity.TurnTestModeOn();

            entity.Apply(domainEvent);

            mockEntity.Verify(ar => ar.OnEntityHandlerThatMeetsConvention(domainEvent, "test"), Times.Never());
        }
Exemple #3
0
        public void HandlerIsCalledWhenHandlerMeetsTheConventionAndEventIsApplied()
        {
            var domainEvent = new EntityHandlerThatMeetsConventionEvent();
            var entity      = mockEntity.Object;

            entity.TurnTestModeOn();

            entity.Apply(domainEvent);

            mockEntity.Verify(ar => ar.OnEntityHandlerThatMeetsConvention(domainEvent), Times.Once());
        }
Exemple #4
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent, string test)
 {
 }
Exemple #5
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
     EventIds.Add(domainEvent.Sequence);
 }
Exemple #6
0
 public virtual void OnEntityHandlerThatDoesNotMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
 }
Exemple #7
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent, string test)
 {
 }
Exemple #8
0
 public virtual void OnEntityHandlerThatDoesNotMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
 }
Exemple #9
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
     EventIds.Add(domainEvent.Sequence);
 }