예제 #1
0
        public void ShouldNotThrowAnExceptionBeforeDispose()
        {
            var target = new StubEngine();

            Assert.DoesNotThrow(() => target.ThisShouldCauseAnExceptionAfterDispose());

            target.Dispose();
        }
예제 #2
0
        public void ThrowAnExceptionAfterDispose()
        {
            var target = new StubEngine();

            target.Dispose();

            Assert.Throws <ObjectDisposedException>(() => target.ThisShouldCauseAnExceptionAfterDispose());
        }