Пример #1
0
        public void Of_DisposableReference_Disposes()
        {
            var disposable = new DisposeTTests.ClassImpl();

            Dispose.Of(ref disposable);
            Assert.That(disposable.IsDisposed);
        }
Пример #2
0
        public void Of_DisposableValue_Disposes()
        {
            var disposable = new DisposeTTests.StructImpl();

            Dispose.Of(ref disposable);
            Assert.That(disposable.IsDisposed);
        }
Пример #3
0
 public void Of_NullReference_DoesNothing()
 {
     DisposeTTests.ClassImpl obj = null;
     Dispose.Of(ref obj);
 }