public void ShouldNotThrowAnExceptionBeforeDispose() { var target = new StubEngine(); Assert.DoesNotThrow(() => target.ThisShouldCauseAnExceptionAfterDispose()); target.Dispose(); }
public void ThrowAnExceptionAfterDispose() { var target = new StubEngine(); target.Dispose(); Assert.Throws <ObjectDisposedException>(() => target.ThisShouldCauseAnExceptionAfterDispose()); }