aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core.Tests/ClientServerTest.cs
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-12-10 20:04:01 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-12-10 20:11:54 -0800
commit00c144a8d219345519fa1ecccca3f7137a86b7d6 (patch)
treee8b1965321b002d5e815d311f454d6d392ad5c2f /src/csharp/Grpc.Core.Tests/ClientServerTest.cs
parenta1e6097d3957fb24a601b89367659ece042c800f (diff)
increase coverage of ServerCallContext
Diffstat (limited to 'src/csharp/Grpc.Core.Tests/ClientServerTest.cs')
-rw-r--r--src/csharp/Grpc.Core.Tests/ClientServerTest.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs
index e3df143fc9..e324471120 100644
--- a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs
+++ b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs
@@ -262,7 +262,7 @@ namespace Grpc.Core.Tests
}
[Test]
- public void PeerInfoPresent()
+ public void ServerCallContext_PeerInfoPresent()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
{
@@ -274,6 +274,18 @@ namespace Grpc.Core.Tests
}
[Test]
+ public void ServerCallContext_HostAndMethodPresent()
+ {
+ helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
+ {
+ Assert.IsTrue(context.Host.Contains(Host));
+ Assert.AreEqual("/tests.Test/Unary", context.Method);
+ return "PASS";
+ });
+ Assert.AreEqual("PASS", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
+ }
+
+ [Test]
public async Task Channel_WaitForStateChangedAsync()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>