public void BelowMinimumLength_WhenStreamWithoutLengthSupport_ThrowsInvalidException(string bencode)
        {
            var    stream = new LengthNotSupportedStream(bencode);
            Action action = () => Parser.Parse(stream);

            action.Should().Throw <InvalidBencodeException <BNumber> >()
            .Which.StreamPosition.Should().Be(0);
        }
        public void BelowMinimumLength2_WhenStreamLengthNotSupported_ThrowsInvalidBencodeException(string bencode, IBencodeParser bparser)
        {
            var stream = new LengthNotSupportedStream(bencode);

            var    parser = new BListParser(bparser);
            Action action = () => parser.Parse(stream);

            action.Should().Throw <InvalidBencodeException <BList> >().WithMessage("*Unexpected character*");
        }
        public void BelowMinimumLength2_WhenStreamLengthNotSupported_ThrowsInvalidBencodeException(string bencode, IBencodeParser bparser)
        {
            var stream = new LengthNotSupportedStream(bencode);

            var    parser = new BDictionaryParser(bparser);
            Action action = () => parser.Parse(stream);

            action.Should().Throw <InvalidBencodeException <BDictionary> >();
        }
        public void BelowMinimumLength_WhenStreamWithoutLengthSupport_ThrowsInvalidException(string bencode)
        {
            var    stream = new LengthNotSupportedStream(bencode);
            Action action = () => Parser.Parse(stream);

            action.Should().Throw <InvalidBencodeException <BString> >()
            .WithMessage("*Unexpected character. Expected ':' but reached end of stream*")
            .Which.StreamPosition.Should().Be(0);
        }