public void DisposeCallbackIsNotInvokedOnDisposeIfInPrototypeMode()
        {
            IDisposable disposable = mocks.StrictMock<IDisposable>();           
            DummyFactoryObject factory = new DummyFactoryObject(disposable);
            mocks.ReplayAll();
            factory.IsSingleton = false;
            factory.GetObject();
            factory.Dispose();
			// in prototype mode, so the Dispose() method of the object must not be called...
            mocks.VerifyAll();
        }
        public void DisposeCallbackIsNotInvokedOnDisposeIfInPrototypeMode()
        {
            IDisposable        disposable = mocks.StrictMock <IDisposable>();
            DummyFactoryObject factory    = new DummyFactoryObject(disposable);

            mocks.ReplayAll();
            factory.IsSingleton = false;
            factory.GetObject();
            factory.Dispose();
            // in prototype mode, so the Dispose() method of the object must not be called...
            mocks.VerifyAll();
        }
        public void DisposeCallbackIsNotInvokedOnDisposeIfInPrototypeMode()
        {
            IDisposable        disposable = A.Fake <IDisposable>();
            DummyFactoryObject factory    = new DummyFactoryObject(disposable);

            factory.IsSingleton = false;
            factory.GetObject();
            factory.Dispose();

            // in prototype mode, so the Dispose() method of the object must not be called...
            A.CallTo(() => disposable.Dispose()).MustNotHaveHappened();
        }