Skip to content
Snippets Groups Projects
Commit 00c144a8 authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

increase coverage of ServerCallContext

parent a1e6097d
No related branches found
No related tags found
No related merge requests found
...@@ -262,7 +262,7 @@ namespace Grpc.Core.Tests ...@@ -262,7 +262,7 @@ namespace Grpc.Core.Tests
} }
[Test] [Test]
public void PeerInfoPresent() public void ServerCallContext_PeerInfoPresent()
{ {
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) => helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
{ {
...@@ -273,6 +273,18 @@ namespace Grpc.Core.Tests ...@@ -273,6 +273,18 @@ namespace Grpc.Core.Tests
Assert.IsTrue(peer.Contains(Host)); Assert.IsTrue(peer.Contains(Host));
} }
[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] [Test]
public async Task Channel_WaitForStateChangedAsync() public async Task Channel_WaitForStateChangedAsync()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment