aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs')
-rw-r--r--src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
index fb292945a6..070674bae9 100644
--- a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
+++ b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
@@ -79,16 +79,17 @@ namespace Grpc.HealthCheck.Tests
[Test]
public void ServiceIsRunning()
{
- serviceImpl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING);
+ serviceImpl.SetStatus("", HealthCheckResponse.Types.ServingStatus.Serving);
var response = client.Check(new HealthCheckRequest { Service = "" });
- Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, response.Status);
+ Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.Serving, response.Status);
}
[Test]
public void ServiceDoesntExist()
{
- Assert.Throws(Is.TypeOf(typeof(RpcException)).And.Property("Status").Property("StatusCode").EqualTo(StatusCode.NotFound), () => client.Check(new HealthCheckRequest { Service = "nonexistent.service" }));
+ var ex = Assert.Throws<RpcException>(() => client.Check(new HealthCheckRequest { Service = "nonexistent.service" }));
+ Assert.AreEqual(StatusCode.NotFound, ex.Status.StatusCode);
}
// TODO(jtattermusch): add test with timeout once timeouts are supported