public async Task WriteAsyncWithArrayWorks()
        {
            var expected = new byte[1];

            await WritingStream.WriteAsync(expected, 0, expected.Length);

            Assert.Equal(expected, await ReadFromPipeAsByteArrayAsync());
        }
        public async Task BasicLargeWrite()
        {
            var expected = new byte[8000];

            await WritingStream.WriteAsync(expected);

            Assert.Equal(expected, await ReadFromPipeAsByteArrayAsync());
        }
示例#3
0
 public async Task WriteStringToStreamAsync(string input)
 {
     await WritingStream.WriteAsync(Encoding.ASCII.GetBytes(input));
 }