public void ClearSubscribers() { int result = 0; var obs = new Observable(); obs += () => result++; obs += () => result++; obs.Notify(); obs.ClearSubscribers(); obs.Notify(); Assert.AreEqual(2, result); }
public void ClearSubscribers() { int result = 0; var obs = new Observable(); obs += () => result++; obs += () => result++; obs.Notify(); obs.ClearSubscribers(); obs.Notify(); Assert.AreEqual(2, result); }