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

            var chars = "Hello world!".ToCharArray();

            _writer.Write(chars, 0, chars.Length);
            _writer.Write(_marker);

            var readChars = _reader.ReadChars(chars.Length);

            Assert.AreEqual(chars, readChars);

            Assert.AreEqual(_marker, _reader.ReadUInt32());
        }