public void Should_ContextManager_initialize_TestThreadContext_when_constructed()
        {
            var contextManager = CreateContextManager();

            TestThreadContext result = contextManager.TestThreadContext;

            result.Should().NotBeNull();
            result.Should().BeSameAs(TestThreadContainer.Resolve <TestThreadContext>());
        }
        public void Should_disposing_event_fired_when_test_thread_container_disposes()
        {
            bool wasDisposingFired = false;

            ContextManagerStub.TestThreadContext.Should().NotBeNull();
            ContextManagerStub.TestThreadContext.Disposing += context =>
            {
                context.Should().BeSameAs(ContextManagerStub.TestThreadContext);
                wasDisposingFired = true;
            };

            TestThreadContainer.Dispose();

            wasDisposingFired.Should().BeTrue();
        }