コード例 #1
0
        public void SetUp()
        {
            theContext = MockRepository.GenerateMock<ILifecycleContext>();
            theLifecycle = new TransientLifecycle();

            theCache = MockRepository.GenerateMock<IObjectCache>();
            theContext.Stub(x => x.Transients).Return(theCache);
        }
コード例 #2
0
        public TransientLifecycleTester()
        {
            theContext = Substitute.For<ILifecycleContext>();
            theLifecycle = new TransientLifecycle();

            theCache = Substitute.For<ITransientTracking>();
            theContext.Transients.Returns(theCache);
        }
コード例 #3
0
        public TransientLifecycleTester()
        {
            theContext = MockRepository.GenerateMock<ILifecycleContext>();
            theLifecycle = new TransientLifecycle();

            theCache = MockRepository.GenerateMock<ITransientTracking>();
            theContext.Stub(x => x.Transients).Return(theCache);
        }