Home
last modified time | relevance | path

Searched refs:mockClient (Results 1 – 2 of 2) sorted by relevance

/external/grpc-grpc/src/csharp/Grpc.Examples.Tests/
DMathClientMockableTest.cs36 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseBlockingUnaryCallCanBeMocked()
39mockClient.Setup(m => m.Div(Moq.It.IsAny<DivArgs>(), null, null, CancellationToken.None)).Returns(… in ClientBaseBlockingUnaryCallCanBeMocked()
40 Assert.AreSame(expected, mockClient.Object.Div(new DivArgs())); in ClientBaseBlockingUnaryCallCanBeMocked()
46 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseBlockingUnaryCallWithCallOptionsCallCanBeMocked()
49mockClient.Setup(m => m.Div(Moq.It.IsAny<DivArgs>(), Moq.It.IsAny<CallOptions>())).Returns(expecte… in ClientBaseBlockingUnaryCallWithCallOptionsCallCanBeMocked()
50 Assert.AreSame(expected, mockClient.Object.Div(new DivArgs(), new CallOptions())); in ClientBaseBlockingUnaryCallWithCallOptionsCallCanBeMocked()
56 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseAsyncUnaryCallCanBeMocked()
60mockClient.Setup(m => m.DivAsync(Moq.It.IsAny<DivArgs>(), null, null, CancellationToken.None)).Ret… in ClientBaseAsyncUnaryCallCanBeMocked()
61 Assert.AreSame(fakeCall, mockClient.Object.DivAsync(new DivArgs())); in ClientBaseAsyncUnaryCallCanBeMocked()
67 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseClientStreamingCallCanBeMocked()
[all …]
/external/grpc-grpc-java/alts/src/test/java/io/grpc/alts/internal/
DAltsTsiHandshakerTest.java67 private AltsHandshakerClient mockClient; field in AltsTsiHandshakerTest
74 mockClient = mock(AltsHandshakerClient.class); in setUp()
76 handshakerClient = new AltsTsiHandshaker(true, mockClient); in setUp()
103 verify(mockClient, never()).startClientHandshake(); in processBytesFromPeerFalseStart()
104 verify(mockClient, never()).startServerHandshake(Matchers.<ByteBuffer>any()); in processBytesFromPeerFalseStart()
105 verify(mockClient, never()).next(Matchers.<ByteBuffer>any()); in processBytesFromPeerFalseStart()
174 verify(mockClient, never()).startServerHandshake(Matchers.<ByteBuffer>any()); in processBytesFromPeerClientNext()
175 when(mockClient.startClientHandshake()).thenReturn(outputFrame); in processBytesFromPeerClientNext()
176 when(mockClient.next(transportBuffer)).thenReturn(outputFrame); in processBytesFromPeerClientNext()
177 when(mockClient.isFinished()).thenReturn(false); in processBytesFromPeerClientNext()
[all …]