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

fixup tests

parent 18ef23ee
Branches
Tags
No related merge requests found
......@@ -212,7 +212,23 @@ namespace Grpc.Core.Internal.Tests
AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask);
var ex = Assert.Throws<RpcException>(() => requestStream.WriteAsync("request1"));
//TODO: add assert.
Assert.AreEqual(Status.DefaultSuccess, ex.Status);
}
[Test]
public void ClientStreaming_WriteAfterReceivingStatusThrowsRpcException2()
{
var resultTask = asyncCall.ClientStreamingCallAsync();
var requestStream = new ClientRequestStream<string, string>(asyncCall);
fakeCall.UnaryResponseClientHandler(true,
new ClientSideStatus(new Status(StatusCode.OutOfRange, ""), new Metadata()),
CreateResponsePayload(),
new Metadata());
AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.OutOfRange);
var ex = Assert.Throws<RpcException>(() => requestStream.WriteAsync("request1"));
Assert.AreEqual(StatusCode.OutOfRange, ex.Status.StatusCode);
}
[Test]
......@@ -375,7 +391,7 @@ namespace Grpc.Core.Internal.Tests
AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask);
var ex = Assert.ThrowsAsync<RpcException>(async () => await requestStream.WriteAsync("request1"));
//TODO: add assert.
Assert.AreEqual(Status.DefaultSuccess, ex.Status);
}
[Test]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment