public void FilterLetsResetTypePassingThrough() { var filter = new GenericHandleDublicatedEventsFilter <PermissionDeniedEvent, StartNextSyncEvent>(); Assert.IsFalse(filter.Handle(new Mock <StartNextSyncEvent>(false).Object)); Assert.IsFalse(filter.Handle(new Mock <StartNextSyncEvent>(false).Object)); }
public void FilterIgnoresNotMatchingFilterType() { var filter = new GenericHandleDublicatedEventsFilter <PermissionDeniedEvent, SuccessfulLoginEvent>(); Assert.IsFalse(filter.Handle(new Mock <ISyncEvent>().Object)); Assert.IsFalse(filter.Handle(new Mock <ISyncEvent>().Object)); }
public void FilterHandlesSecondMatchingFilterType() { var filter = new GenericHandleDublicatedEventsFilter <PermissionDeniedEvent, SuccessfulLoginEvent>(); Assert.IsFalse(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); }
public void FilterLetMatchingFilterTypePassAfterResetTypeOccured() { var filter = new GenericHandleDublicatedEventsFilter<PermissionDeniedEvent, StartNextSyncEvent>(); Assert.IsFalse(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsFalse(filter.Handle(new Mock<StartNextSyncEvent>(false).Object)); Assert.IsFalse(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); }
public void FilterLetMatchingFilterTypePassAfterResetTypeOccured() { var filter = new GenericHandleDublicatedEventsFilter <PermissionDeniedEvent, StartNextSyncEvent>(); Assert.IsFalse(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsFalse(filter.Handle(new Mock <StartNextSyncEvent>(false).Object)); Assert.IsFalse(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); }
public void FilterHandlesSecondMatchingFilterType() { var filter = new GenericHandleDublicatedEventsFilter<PermissionDeniedEvent, SuccessfulLoginEvent>(); Assert.IsFalse(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); Assert.IsTrue(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); }
public void FilterLetsFirstFilterTypePassing() { var filter = new GenericHandleDublicatedEventsFilter<PermissionDeniedEvent, SuccessfulLoginEvent>(); Assert.IsFalse(filter.Handle(new Mock<PermissionDeniedEvent>(this.deniedException).Object)); }
public void FilterLetsResetTypePassingThrough() { var filter = new GenericHandleDublicatedEventsFilter<PermissionDeniedEvent, StartNextSyncEvent>(); Assert.IsFalse(filter.Handle(new Mock<StartNextSyncEvent>(false).Object)); Assert.IsFalse(filter.Handle(new Mock<StartNextSyncEvent>(false).Object)); }
public void FilterIgnoresNotMatchingFilterType() { var filter = new GenericHandleDublicatedEventsFilter<PermissionDeniedEvent, SuccessfulLoginEvent>(); Assert.IsFalse(filter.Handle(new Mock<ISyncEvent>().Object)); Assert.IsFalse(filter.Handle(new Mock<ISyncEvent>().Object)); }
public void FilterLetsFirstFilterTypePassing() { var filter = new GenericHandleDublicatedEventsFilter <PermissionDeniedEvent, SuccessfulLoginEvent>(); Assert.IsFalse(filter.Handle(new Mock <PermissionDeniedEvent>(this.deniedException).Object)); }