public void HandlerIsNotCalledWhenHandlerDoesNotMeetTheConventionAndEventIsApplied() { var domainEvent = new EntityHandlerThatMeetsConventionEvent(); var entity = mockEntity.Object; entity.TurnTestModeOn(); entity.Apply(domainEvent); mockEntity.Verify(ar => ar.OnEntityHandlerThatDoesNotMeetsConvention(domainEvent), Times.Never()); }
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()); }
public void HandlerIsCalledWhenHandlerMeetsTheConventionAndEventIsApplied() { var domainEvent = new EntityHandlerThatMeetsConventionEvent(); var entity = mockEntity.Object; entity.TurnTestModeOn(); entity.Apply(domainEvent); mockEntity.Verify(ar => ar.OnEntityHandlerThatMeetsConvention(domainEvent), Times.Once()); }
public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent, string test) { }
public virtual void OnEntityHandlerThatMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent) { EventIds.Add(domainEvent.Sequence); }
public virtual void OnEntityHandlerThatDoesNotMeetsConvention(EntityHandlerThatMeetsConventionEvent domainEvent) { }