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); }
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); }
public void TestMock() { var d1 = new MockDisposable(); Assert.IsFalse(d1.Disposed); d1.Dispose(); Assert.IsTrue(d1.Disposed); }