Пример #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());
        }