Example #1
0
 public ValueTask <long> GetPingPongPayloadSize()
 {
     return(StubHttpMessageHandler.GetPayloadSize(channel =>
     {
         var proxy = new TestServiceNative.TestServiceNativeClient(channel);
         return proxy.PingPongAsync(_payload).ResponseAsync;
     }));
 }
Example #2
0
        public NativeGrpcClientCallTest(SomeObject payload)
        {
            _payload = DomainExtensions.CopyToProto(payload);

            _httpHandler = new StubHttpMessageHandler(_payload);
            _channel     = GrpcChannel.ForAddress("http://localhost", new GrpcChannelOptions {
                HttpHandler = _httpHandler
            });

            _proxy = new TestServiceNative.TestServiceNativeClient(_channel);
        }
Example #3
0
        public NativeGrpcCombinedCallTest(SomeObject payload)
        {
            _payload = DomainExtensions.CopyToProto(payload);
            _server  = new TestServer(new WebHostBuilder().UseStartup <Startup>());
            _client  = _server.CreateClient();

            _channel = GrpcChannel.ForAddress("http://localhost", new GrpcChannelOptions {
                HttpClient = _client
            });

            _proxy = new TestServiceNative.TestServiceNativeClient(_channel);
        }