aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-04-08 13:32:30 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-04-11 11:09:15 -0700
commit9f19bd3eb1c01fbde43375db2f51dfdb0f9504ec (patch)
treef80c679257334a9322e1536f19f688142a4f79a7 /src/csharp
parent6c0dee8b0de56613f9988f0dbfac2e46d9024653 (diff)
migrate Grpc.IntegrationTesting to NUnit3
Diffstat (limited to 'src/csharp')
-rw-r--r--src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs6
-rw-r--r--src/csharp/Grpc.IntegrationTesting/InteropClient.cs8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs
index 99aa729030..5fd0e14e78 100644
--- a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs
+++ b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs
@@ -84,7 +84,7 @@ namespace Grpc.IntegrationTesting
{
var call = client.StreamingInputCall();
- var ex = Assert.Throws<RpcException>(async () => await call);
+ var ex = Assert.ThrowsAsync<RpcException>(async () => await call);
Assert.AreEqual(StatusCode.Unimplemented, ex.Status.StatusCode);
}
@@ -93,7 +93,7 @@ namespace Grpc.IntegrationTesting
{
var call = client.StreamingOutputCall(new StreamingOutputCallRequest());
- var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
+ var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.Unimplemented, ex.Status.StatusCode);
}
@@ -102,7 +102,7 @@ namespace Grpc.IntegrationTesting
{
var call = client.FullDuplexCall();
- var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
+ var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.Unimplemented, ex.Status.StatusCode);
}
diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs
index 7ca5221936..5436517960 100644
--- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs
+++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs
@@ -445,7 +445,7 @@ namespace Grpc.IntegrationTesting
await Task.Delay(1000);
cts.Cancel();
- var ex = Assert.Throws<RpcException>(async () => await call.ResponseAsync);
+ var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseAsync);
Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode);
}
Console.WriteLine("Passed!");
@@ -471,7 +471,7 @@ namespace Grpc.IntegrationTesting
cts.Cancel();
- var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
+ var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode);
}
Console.WriteLine("Passed!");
@@ -493,7 +493,7 @@ namespace Grpc.IntegrationTesting
// Deadline was reached before write has started. Eat the exception and continue.
}
- var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
+ var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode);
}
Console.WriteLine("Passed!");
@@ -572,7 +572,7 @@ namespace Grpc.IntegrationTesting
await call.RequestStream.WriteAsync(request);
await call.RequestStream.CompleteAsync();
- var e = Assert.Throws<RpcException>(async () => await call.ResponseStream.ToListAsync());
+ var e = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.ToListAsync());
Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode);
Assert.AreEqual(echoStatus.Message, e.Status.Detail);
}