Exemplo n.º 1
0
        public void CallProtectedMethodDisposingUnmanagedResourcesWhenUserCodeCallsDispose()
        {
            DisposableObjectStub stub = new DisposableObjectStub();

            stub.Dispose();

            Assert.That(stub.IsDisposingUnmanagedResourcesCalled, Is.True);
        }
Exemplo n.º 2
0
        public void CallProtectedMethodOnDisposingWhenUserCodeCallsDispose()
        {
            DisposableObjectStub stub = new DisposableObjectStub();

            stub.Dispose();

            Assert.That(stub.IsOnDisposingBeenCalled, Is.True);
        }
Exemplo n.º 3
0
        public void ReturnTrueWhenHittingIsDisposedGivenTheObjectIsDisposed()
        {
            DisposableObjectStub stub = new DisposableObjectStub();

            stub.Dispose();

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