예제 #1
0
 public void DisposeCalled()
 {
     var disposable = new MockDisposable();
     Assert.AreEqual(0, disposable.DisposeCalled);
     disposable.Dispose();
     Assert.AreEqual(1, disposable.DisposeCalled);
     disposable.Dispose();
     Assert.AreEqual(1, disposable.DisposeCalled);
 }
예제 #2
0
        public void DisposeCalled()
        {
            var disposable = new MockDisposable();

            Assert.AreEqual(0, disposable.DisposeCalled);
            disposable.Dispose();
            Assert.AreEqual(1, disposable.DisposeCalled);
            disposable.Dispose();
            Assert.AreEqual(1, disposable.DisposeCalled);
        }
예제 #3
0
        public void TestMock()
        {
            var d1 = new MockDisposable();

            Assert.IsFalse(d1.Disposed);
            d1.Dispose();
            Assert.IsTrue(d1.Disposed);
        }