Exemplo n.º 1
0
        public static async Task MiscWriteLineAsync()
        {
            var sw = new ArrayPooledTextWriter();
            await sw.WriteLineAsync('H');

            await sw.WriteLineAsync(new char[] { 'e', 'l', 'l', 'o' });

            await sw.WriteLineAsync("World!");

            Assert.Equal(
                string.Format("H{0}ello{0}World!{0}", Environment.NewLine),
                sw.ToString());
        }
Exemplo n.º 2
0
        public static async Task TestWriteLineAsyncCharArray()
        {
            ArrayPooledTextWriter sw = new ArrayPooledTextWriter();
            await sw.WriteLineAsync(new char[] { 'H', 'e', 'l', 'l', 'o' });

            Assert.Equal("Hello" + Environment.NewLine, sw.ToString());
        }