示例#1
0
        public void CallProtectedMethodDisposingUnmanagedResourcesWhenUserCodeCallsDispose()
        {
            DisposableObjectStub stub = new DisposableObjectStub();

            stub.Dispose();

            Assert.That(stub.IsDisposingUnmanagedResourcesCalled, Is.True);
        }
示例#2
0
        public void CallProtectedMethodOnDisposingWhenUserCodeCallsDispose()
        {
            DisposableObjectStub stub = new DisposableObjectStub();

            stub.Dispose();

            Assert.That(stub.IsOnDisposingBeenCalled, Is.True);
        }
示例#3
0
        public void ReturnTrueWhenHittingIsDisposedGivenTheObjectIsDisposed()
        {
            DisposableObjectStub stub = new DisposableObjectStub();

            stub.Dispose();

            Assert.That(stub.IsDisposed, Is.True);
        }