aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Examples.Tests
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-07-14 19:29:35 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-07-15 11:36:53 -0700
commitb533281e8e4535498876d870414c5f58e5cd1cd7 (patch)
tree8951f1c4bd50a11452d25d85acd264d54498421b /src/csharp/Grpc.Examples.Tests
parente5c9b80566c3260035187b19e37c91f5cd3d4e2a (diff)
adjust C# generator to match the new API
Diffstat (limited to 'src/csharp/Grpc.Examples.Tests')
-rw-r--r--src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
index 10dceb60aa..e7c4b33120 100644
--- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
+++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
@@ -49,7 +49,7 @@ namespace math.Tests
string host = "localhost";
Server server;
Channel channel;
- Math.IMathClient client;
+ Math.MathClient client;
[TestFixtureSetUp]
public void Init()
@@ -59,14 +59,14 @@ namespace math.Tests
int port = server.AddListeningPort(host, Server.PickUnusedPort);
server.Start();
channel = new Channel(host, port);
+ client = Math.NewClient(channel);
// TODO(jtattermusch): get rid of the custom header here once we have dedicated tests
// for header support.
- var stubConfig = new StubConfiguration((headerBuilder) =>
+ client.HeaderInterceptor = (metadata) =>
{
- headerBuilder.Add(new Metadata.MetadataEntry("customHeader", "abcdef"));
- });
- client = Math.NewStub(channel, stubConfig);
+ metadata.Add(new Metadata.Entry("customHeader", "abcdef"));
+ };
}
[TestFixtureTearDown]