public void Bytes_get_should_throw_when_subject_is_disposed()
        {
            var subject = new ByteArrayChunk(1);
            subject.Dispose();

            Action action = () => { var _ = subject.Bytes; };

            action.ShouldThrow<ObjectDisposedException>().And.ObjectName.Should().Be("ByteArrayChunk");
        }
        public void Disposed_can_be_called_more_than_once()
        {
            var subject = new ByteArrayChunk(1);

            subject.Dispose();
            subject.Dispose();
        }
        public void Dispose_should_not_dispose_forked_handle()
        {
            var subject = new ByteArrayChunk(1);
            var forked = subject.Fork();

            subject.Dispose();

            var reflector = new Reflector((ByteArrayChunk)forked);
            reflector._disposed.Should().BeFalse();
        }
        public void Dispose_should_dispose_subject()
        {
            var subject = new ByteArrayChunk(1);

            subject.Dispose();

            var reflector = new Reflector(subject);
            reflector._disposed.Should().BeTrue();
        }