public void IsDisposedAfterDisposeIsTrue() { var testee = new DisposeNotifyingObject(); testee.Dispose(); testee.IsDisposed.Should().BeTrue(); }
public void NotifiesWhenDisposed() { var disposed = false; var testee = new DisposeNotifyingObject(); testee.Disposed += (sender, e) => disposed = true; testee.Dispose(); disposed.Should().BeTrue(); }