public void DisposableManagedObject_DisposeSetsIsDisposed() { var testObject = new MockDisposableObject(); Assert.IsFalse(testObject.IsDisposed); testObject.Dispose(); Assert.IsTrue(testObject.IsDisposed); }
public void DisposableManagedObject_ThrowIfDisposedDoesWhatItSaysOnTheTin() { var testObject = new MockDisposableObject(); var result = testObject.TestMethod(); Assert.AreEqual("oops", result); testObject.Dispose(); result = testObject.TestMethod(); }