예제 #1
0
        public void WritingToSingleSegmentBuffer()
        {
            IBufferWriter <byte> bufferWriter = new TestBufferWriterSingleSegment();

            bufferWriter.Write(Encoding.UTF8.GetBytes("Hello"));
            bufferWriter.Write(Encoding.UTF8.GetBytes(" World!"));
            Assert.Equal("Hello World!", bufferWriter.ToString());
        }
예제 #2
0
        public void WritingToSingleSegmentBuffer()
        {
            IBufferWriter <byte> bufferWriter = new TestBufferWriterSingleSegment();

            bufferWriter.Write("Hello" u8);
            bufferWriter.Write(" World!" u8);
            Assert.Equal("Hello World!", bufferWriter.ToString());
        }