aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-12-10 07:19:54 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-12-10 07:19:54 -0800
commitd5bd3b6abe069be951c3922c791a30bc15ead209 (patch)
tree7d9d73cec592c3c2a19fc73e29716b1499fac054 /src/csharp/Grpc.Core.Tests/MockServiceHelper.cs
parentbe9e135d6ff5622e4526b7fa9a9df9abfa23bfaa (diff)
parentde04aa12fdc7f197ff6c637308f70bd6bbe210be (diff)
Merge branch 'connected-subchannel' into ping-ping-ping-ping-ping-ping-ping-ping-ping
Diffstat (limited to 'src/csharp/Grpc.Core.Tests/MockServiceHelper.cs')
-rw-r--r--src/csharp/Grpc.Core.Tests/MockServiceHelper.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs
index 567e04eddc..3047314345 100644
--- a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs
+++ b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs
@@ -32,6 +32,7 @@
#endregion
using System;
+using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
@@ -52,6 +53,7 @@ namespace Grpc.Core.Tests
readonly string host;
readonly ServerServiceDefinition serviceDefinition;
+ readonly IEnumerable<ChannelOption> channelOptions;
readonly Method<string, string> unaryMethod;
readonly Method<string, string> clientStreamingMethod;
@@ -66,9 +68,10 @@ namespace Grpc.Core.Tests
Server server;
Channel channel;
- public MockServiceHelper(string host = null, Marshaller<string> marshaller = null)
+ public MockServiceHelper(string host = null, Marshaller<string> marshaller = null, IEnumerable<ChannelOption> channelOptions = null)
{
this.host = host ?? "localhost";
+ this.channelOptions = channelOptions;
marshaller = marshaller ?? Marshallers.StringMarshaller;
unaryMethod = new Method<string, string>(
@@ -154,7 +157,7 @@ namespace Grpc.Core.Tests
{
if (channel == null)
{
- channel = new Channel(Host, GetServer().Ports.Single().BoundPort, ChannelCredentials.Insecure);
+ channel = new Channel(Host, GetServer().Ports.Single().BoundPort, ChannelCredentials.Insecure, channelOptions);
}
return channel;
}