示例#1
0
        public void should_read_string([ValueSource(nameof(GetEncodings))] Encoding encoding,
                                       [ValueSource(nameof(GetBufferSegmentSizes))] int bufferSegmentSize)
        {
            CreateContext(encoding, bufferSegmentSize);

            _writer.Write("Hello World!");
            _writer.Write(_marker);

            Assert.AreEqual("Hello World!", _reader.ReadString());
            Assert.AreEqual(_marker, _reader.ReadUInt32());
        }