public void Dispose_should_set_disposed_flag()
        {
            var pool        = new Mock <ICoreServerSessionPool>().Object;
            var mockWrapped = new Mock <ICoreServerSession>();
            var subject     = new CoreServerSessionPool.ReleaseOnDisposeCoreServerSession(mockWrapped.Object, pool);

            subject.Dispose();

            subject._disposed().Should().BeTrue();
        }
        public void constructor_should_initialize_instance()
        {
            var pool    = new Mock <ICoreServerSessionPool>().Object;
            var wrapped = new Mock <ICoreServerSession>().Object;

            var result = new CoreServerSessionPool.ReleaseOnDisposeCoreServerSession(wrapped, pool);

            result.Wrapped.Should().BeSameAs(wrapped);
            result._pool().Should().BeSameAs(pool);
            result._disposed().Should().BeFalse();
            result._ownsWrapped().Should().BeFalse();
        }