public bool tryConnectServer() { String Hostname = "52.14.116.178"; // For server // String Hostname = "localhost"; // For local int Port = 5000; client = new SubterfugeClient.SubterfugeClient(Hostname, Port.ToString()); // Ensure that the client can connect to the server. try { client.HealthCheck(new HealthCheckRequest()); return(isConnected = true); } catch (RpcException exception) { client = null; return(isConnected = false); } }
public void AnyoneCanAccessHealthCheckEndpoint() { HealthCheckResponse response = client.HealthCheck(new HealthCheckRequest()); Assert.IsTrue(response != null); }