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

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

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

            target.Dispose();

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