An object that notifies when ti is disposed.
Inheritance: DisposableObject, INotifyWhenDisposed
Exemple #1
0
        public void IsDisposedAfterDisposeIsTrue()
        {
            var testee = new DisposeNotifyingObject();

            testee.Dispose();

            testee.IsDisposed.Should().BeTrue();
        }
        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();
        }
Exemple #4
0
        public void NotifiesWhenDisposed()
        {
            var disposed = false;
            var testee   = new DisposeNotifyingObject();

            testee.Disposed += (sender, e) => disposed = true;

            testee.Dispose();

            disposed.Should().BeTrue();
        }
Exemple #5
0
        public void IsDisposedIsInitiallyFalse()
        {
            var testee = new DisposeNotifyingObject();

            testee.IsDisposed.Should().BeFalse();
        }
 public void IsDisposedIsInitiallyFalse()
 {
     var testee = new DisposeNotifyingObject();
     testee.IsDisposed.Should().BeFalse();
 }