Exemplo n.º 1
0
        public async void ShouldWriteToStreamWhenFlushedAsync()
        {
            var stream = new MemoryStream();
            var writer = new MessageWriter(stream, CreatePackStreamFactory());

            writer.Write(new RunMessage("RETURN $x", new Dictionary <string, object> {
                { "x", 1L }
            }));

            await writer.FlushAsync();

            Assert.NotEmpty(stream.ToArray());
        }