示例#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());
        }
示例#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());
        }
示例#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());
        }
示例#4
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent, string test)
 {
 }
示例#5
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
     EventIds.Add(domainEvent.Sequence);
 }
示例#6
0
 public virtual void OnEntityHandlerThatDoesNotMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
 }
示例#7
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent, string test)
 {
 }
示例#8
0
 public virtual void OnEntityHandlerThatDoesNotMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
 }
示例#9
0
 public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent)
 {
     EventIds.Add(domainEvent.Sequence);
 }