コード例 #1
0
        public void Call_customizations_can_be_chained(AsyncServerStreamingTestCallBuilder <HelloReply> sut, Metadata responseHeaders, Status status, Metadata trailers, Action disposableAction)
        {
            var call = sut.WithResponseHeaders(responseHeaders).WithStatus(status).WithTrailers(trailers).WithDisposeAction(disposableAction).Build();

            Assert.Multiple(async() =>
            {
                Assert.That(await call.ResponseHeadersAsync, Is.SameAs(responseHeaders));
                Assert.That(call.GetStatus(), Is.EqualTo(status));
                Assert.That(call.GetTrailers(), Is.EqualTo(trailers));
            });
        }
コード例 #2
0
        public void WithResponseHeaders_enriches_produced_call(AsyncServerStreamingTestCallBuilder <HelloReply> sut, Task <Metadata> responseHeaders)
        {
            var call = sut.WithResponseHeaders(responseHeaders).Build();

            Assert.That(call.ResponseHeadersAsync, Is.SameAs(responseHeaders));
        }