Home
last modified time | relevance | path

Searched refs:fakeCall (Results 1 – 3 of 3) sorted by relevance

/third_party/grpc/src/csharp/Grpc.Core.Tests/Internal/
DAsyncCallTest.cs35 FakeNativeCall fakeCall; field in Grpc.Core.Internal.Tests.AsyncCallTest
44 fakeCall = new FakeNativeCall(); in Init()
47 asyncCall = new AsyncCall<string, string>(callDetails, fakeCall); in Init()
80 fakeCall.UnaryResponseClientCallback.OnUnaryResponseClient(true, in AsyncUnary_Success()
85 AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); in AsyncUnary_Success()
92 fakeCall.UnaryResponseClientCallback.OnUnaryResponseClient(true, in AsyncUnary_NonSuccessStatusCode()
97 AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.InvalidArgument); in AsyncUnary_NonSuccessStatusCode()
104 fakeCall.UnaryResponseClientCallback.OnUnaryResponseClient(true, in AsyncUnary_NullResponsePayload()
110 AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.Internal); in AsyncUnary_NullResponsePayload()
119 Assert.IsTrue(fakeCall.IsDisposed); in AsyncUnary_RequestSerializationExceptionDoesntLeakResources()
[all …]
DAsyncCallServerTest.cs36 FakeNativeCall fakeCall; field in Grpc.Core.Internal.Tests.AsyncCallServerTest
51 fakeCall = new FakeNativeCall(); in Init()
55 asyncCallServer.InitializeForTesting(fakeCall); in Init()
70 fakeCall.ReceivedCloseOnServerCallback.OnReceivedCloseOnServer(true, cancelled: true); in CancelNotificationAfterStartDisposes()
71 AssertFinished(asyncCallServer, fakeCall, finishedTask); in CancelNotificationAfterStartDisposes()
82 fakeCall.ReceivedCloseOnServerCallback.OnReceivedCloseOnServer(true, cancelled: true); in CancelNotificationAfterStartDisposesAfterPendingReadFinishes()
83 fakeCall.ReceivedMessageCallback.OnReceivedMessage(true, CreateNullResponse()); in CancelNotificationAfterStartDisposesAfterPendingReadFinishes()
86 AssertFinished(asyncCallServer, fakeCall, finishedTask); in CancelNotificationAfterStartDisposesAfterPendingReadFinishes()
95 fakeCall.ReceivedCloseOnServerCallback.OnReceivedCloseOnServer(true, cancelled: true); in ReadAfterCancelNotificationCanSucceed()
101 AssertFinished(asyncCallServer, fakeCall, finishedTask); in ReadAfterCancelNotificationCanSucceed()
[all …]
/third_party/grpc/src/csharp/Grpc.Examples.Tests/
DMathClientMockableTest.cs59 …var fakeCall = TestCalls.AsyncUnaryCall<DivReply>(Task.FromResult(new DivReply()), Task.FromResult… in ClientBaseAsyncUnaryCallCanBeMocked()
60 …up(m => m.DivAsync(Moq.It.IsAny<DivArgs>(), null, null, CancellationToken.None)).Returns(fakeCall); in ClientBaseAsyncUnaryCallCanBeMocked()
61 Assert.AreSame(fakeCall, mockClient.Object.DivAsync(new DivArgs())); in ClientBaseAsyncUnaryCallCanBeMocked()
71 …var fakeCall = TestCalls.AsyncClientStreamingCall<Num, Num>(mockRequestStream.Object, Task.FromRes… in ClientBaseClientStreamingCallCanBeMocked()
72 mockClient.Setup(m => m.Sum(null, null, CancellationToken.None)).Returns(fakeCall); in ClientBaseClientStreamingCallCanBeMocked()
73 Assert.AreSame(fakeCall, mockClient.Object.Sum()); in ClientBaseClientStreamingCallCanBeMocked()
83 …var fakeCall = TestCalls.AsyncServerStreamingCall<Num>(mockResponseStream.Object, Task.FromResult(… in ClientBaseServerStreamingCallCanBeMocked()
84 …t.Setup(m => m.Fib(Moq.It.IsAny<FibArgs>(), null, null, CancellationToken.None)).Returns(fakeCall); in ClientBaseServerStreamingCallCanBeMocked()
85 Assert.AreSame(fakeCall, mockClient.Object.Fib(new FibArgs())); in ClientBaseServerStreamingCallCanBeMocked()
96 …var fakeCall = TestCalls.AsyncDuplexStreamingCall<DivArgs, DivReply>(mockRequestStream.Object, moc… in ClientBaseDuplexStreamingCallCanBeMocked()
[all …]