Exemplo n.º 1
0
        public async Task PostStream()
        {
            using (MockHttpServer.PostStreamReturnByteArray(async x => await x.ReadToEndAsync()))
            {
                var input  = new byte[] { 3, 1, 6, 9, 38 };
                var client = HttpApiClient <IPostStream> .Create("http://localhost:8844/path");

                var result = await client.PostStream(new MemoryStream(input));

                Assert.IsTrue(result.SequenceEqual(input));
            }
        }