public void Dispose_should_dispose_subject()
        {
            var subject = new BsonChunkPool(1, 16);

            subject.Dispose();

            var reflector = new Reflector(subject);
            reflector._disposed.Should().BeTrue();
        }
        public void GetChunk_should_throw_when_subject_is_disposed()
        {
            var subject = new BsonChunkPool(1, 16);
            subject.Dispose();

            Action action = () => subject.GetChunk(1);

            action.ShouldThrow<ObjectDisposedException>().And.ObjectName.Should().Be("BsonChunkPool");
        }
        public void Dispose_can_be_called_more_than_once()
        {
            var subject = new BsonChunkPool(1, 16);

            subject.Dispose();
            subject.Dispose();
        }