public async Task DisposeAsyncCallsCompleteAsync() { var pipeWriter = new TestPipeWriter(); Stream stream = pipeWriter.AsStream(); await stream.DisposeAsync(); Assert.True(pipeWriter.CompleteAsyncCalled); }
public async Task DefaultPipeWriterImplementationReturnsPipeWriterStream() { var pipeWriter = new TestPipeWriter(); Stream stream = pipeWriter.AsStream(); await stream.WriteAsync(new byte[10]); Assert.True(pipeWriter.WriteAsyncCalled); await stream.FlushAsync(); Assert.True(pipeWriter.FlushCalled); }