public void DisposeCallsActionFirstTimeOnly()
 {
     var calls = 0;
     var disposable = new DelegatingDisposable(delegate { calls++; });
     disposable.Dispose();
     Assert.Equal(1, calls);
     disposable.Dispose();
     Assert.Equal(1, calls);
 }
        public void DisposeCallsActionFirstTimeOnly()
        {
            var calls      = 0;
            var disposable = new DelegatingDisposable(delegate { calls++; });

            disposable.Dispose();
            Assert.Equal(1, calls);
            disposable.Dispose();
            Assert.Equal(1, calls);
        }
 public void DisposeCallsAction()
 {
     var called = false;
     var disposable = new DelegatingDisposable(delegate { called = true; });
     disposable.Dispose();
     Assert.True(called);
 }
        public void DisposeCallsAction()
        {
            var called     = false;
            var disposable = new DelegatingDisposable(delegate { called = true; });

            disposable.Dispose();
            Assert.True(called);
        }