Home
last modified time | relevance | path

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

/external/grpc-grpc/src/csharp/Grpc.Core.Tests/Internal/
DAsyncCallTest.cs34 FakeNativeCall fakeCall; field in Grpc.Core.Internal.Tests.AsyncCallTest
42 fakeCall = new FakeNativeCall(); in Init()
45 asyncCall = new AsyncCall<string, string>(callDetails, fakeCall); in Init()
76 fakeCall.UnaryResponseClientCallback.OnUnaryResponseClient(true, in AsyncUnary_Success()
81 AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); in AsyncUnary_Success()
88 fakeCall.UnaryResponseClientCallback.OnUnaryResponseClient(true, in AsyncUnary_NonSuccessStatusCode()
93 AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.InvalidArgument); in AsyncUnary_NonSuccessStatusCode()
100 fakeCall.UnaryResponseClientCallback.OnUnaryResponseClient(true, in AsyncUnary_NullResponsePayload()
106 AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.Internal); in AsyncUnary_NullResponsePayload()
115 Assert.IsTrue(fakeCall.IsDisposed); in AsyncUnary_RequestSerializationExceptionDoesntLeakResources()
[all …]
DAsyncCallServerTest.cs36 FakeNativeCall fakeCall; field in Grpc.Core.Internal.Tests.AsyncCallServerTest
50 fakeCall = new FakeNativeCall(); in Init()
54 asyncCallServer.InitializeForTesting(fakeCall); in Init()
67 fakeCall.ReceivedCloseOnServerCallback.OnReceivedCloseOnServer(true, cancelled: true); in CancelNotificationAfterStartDisposes()
68 AssertFinished(asyncCallServer, fakeCall, finishedTask); in CancelNotificationAfterStartDisposes()
79 fakeCall.ReceivedCloseOnServerCallback.OnReceivedCloseOnServer(true, cancelled: true); in CancelNotificationAfterStartDisposesAfterPendingReadFinishes()
80 fakeCall.ReceivedMessageCallback.OnReceivedMessage(true, null); in CancelNotificationAfterStartDisposesAfterPendingReadFinishes()
83 AssertFinished(asyncCallServer, fakeCall, finishedTask); in CancelNotificationAfterStartDisposesAfterPendingReadFinishes()
92 fakeCall.ReceivedCloseOnServerCallback.OnReceivedCloseOnServer(true, cancelled: true); in ReadAfterCancelNotificationCanSucceed()
98 AssertFinished(asyncCallServer, fakeCall, finishedTask); in ReadAfterCancelNotificationCanSucceed()
[all …]
/external/grpc-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 …]