Example #1
0
        public void OnlyDisposingUnmanagedResourcesShouldBeCalled()
        {
            var stub = new DisposableObjectStub();

            stub.InvokePrivateMethod("Dispose", new[] { typeof(bool) }, false);

            Assert.That(stub.IsDisposingUnmanagedResourcesCalled, Is.True);
            Assert.That(stub.IsDisposingManagedResourcesCalled, Is.False);
        }