public void ShouldTellUsIfAnEventTagIsBeingIgnored() { Assert.IsTrue(watcher.IsIgnoring(null)); watcher.Ignore(EmptyEventTag.Instance); Assert.IsTrue(watcher.IsIgnoring(EmptyEventTag.Instance)); watcher.DontIgnore(EmptyEventTag.Instance); Assert.IsFalse(watcher.IsIgnoring(EmptyEventTag.Instance)); }
public void ShouldCallOnSignalHandlerIfIgnoreIsLongerIgnored() { var result = 0; var watcher = new Watcher(onSignal: (ISignal signal) => { result++; }); watcher.Ignore(EmptyEventTag.Instance); watcher.OnNext(EmptySignal.Instance); watcher.DontIgnore(EmptyEventTag.Instance); watcher.OnNext(EmptySignal.Instance); Assert.AreEqual(1, result); }