Example #1
0
        public static void EndOfStream(ReadOnlySequence <char> smallData)
        {
            using var tr = new TextBufferReader(smallData);
            var result = tr.ReadToEnd();

            Equal("HELLO", result);
            True(tr.Peek() == -1, "End of TextReader was not true after ReadToEnd");
        }
Example #2
0
        public void NotEndOfStream(ReadOnlySequence <char> smallData)
        {
            using var tr = new TextBufferReader(smallData);
            char[] charBuff = new char[3];
            var    result   = tr.Read(charBuff, 0, 3);

            Equal(3, result);
            Equal("HEL", new string(charBuff));
            False(tr.Peek() == -1, "End of TextReader was true after ReadToEnd");
        }