/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithDelegateTest.java | 20 import static org.mockito.AdditionalAnswers.delegatesTo; 62 List<String> mock = mock(List.class, delegatesTo(delegatedList)); in when_not_stubbed_delegate_should_be_called() 73 List<String> mock = mock(List.class, delegatesTo(delegatedList)); in when_stubbed_the_delegate_should_not_be_called() 87 List<String> mockedList = mock(List.class, delegatesTo(delegatedList)); in delegate_should_not_be_called_when_stubbed2() 99 IMethods methods = mock(IMethods.class, delegatesTo(new MethodsImpl())); in null_wrapper_dont_throw_exception_from_org_mockito_package() 111 List<String> mock = mock(List.class, delegatesTo(new FakeList<String>())); in instance_of_different_class_can_be_called() 119 List<String> mock = mock(List.class, delegatesTo(new FakeList<String>())); in method_with_subtype_return_can_be_called() 127 List<String> mock = mock(List.class, delegatesTo(new FakeList<String>())); in calling_missing_method_should_throw_exception() 139 List<String> mock = mock(List.class, delegatesTo(new FakeListWithWrongMethods<String>())); in calling_method_with_wrong_primitive_return_should_throw_exception() 151 List<String> mock = mock(List.class, delegatesTo(new FakeListWithWrongMethods<String>())); in calling_method_with_wrong_reference_return_should_throw_exception() [all …]
|
D | StubbingWithDelegateVarArgsTest.java | 10 import static org.mockito.AdditionalAnswers.delegatesTo; 32 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method() 39 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method_without_arguments() 47 .defaultAnswer(delegatesTo(new FooImpl()))); in should_not_fail_when_calling_varargs_method_with_null_argument()
|
/external/grpc-grpc-java/examples/example-kotlin/src/test/kotlin/io/grpc/examples/helloworld/ |
D | HelloWorldClientTest.kt | 20 import org.mockito.AdditionalAnswers.delegatesTo 55 …private val serviceImpl = mock(GreeterGrpc.GreeterImplBase::class.java, delegatesTo<Any>(object : …
|
/external/grpc-grpc-java/examples/src/test/java/io/grpc/examples/helloworld/ |
D | HelloWorldClientTest.java | 20 import static org.mockito.AdditionalAnswers.delegatesTo; 55 mock(GreeterGrpc.GreeterImplBase.class, delegatesTo(new GreeterGrpc.GreeterImplBase() {}));
|
/external/grpc-grpc-java/testing/src/test/java/io/grpc/testing/ |
D | GrpcCleanupRuleTest.java | 22 import static org.mockito.AdditionalAnswers.delegatesTo; 312 delegatesTo(new FakeResource(1 /* cleanupNanos */, 10 /* awaitReleaseNanos */))); in multiResource_timeoutCalculation() 315 delegatesTo(new FakeResource(100 /* cleanupNanos */, 1000 /* awaitReleaseNanos */))); in multiResource_timeoutCalculation() 349 delegatesTo(new FakeResource(1 /* cleanupNanos */, 10 /* awaitReleaseNanos */))); in multiResource_timeoutCalculation_customTimeout() 352 delegatesTo(new FakeResource(100 /* cleanupNanos */, 1000 /* awaitReleaseNanos */))); in multiResource_timeoutCalculation_customTimeout()
|
/external/grpc-grpc-java/examples/src/test/java/io/grpc/examples/header/ |
D | HeaderClientInterceptorTest.java | 21 import static org.mockito.AdditionalAnswers.delegatesTo; 66 private final ServerInterceptor mockServerInterceptor = mock(ServerInterceptor.class, delegatesTo(
|
D | HeaderServerInterceptorTest.java | 21 import static org.mockito.AdditionalAnswers.delegatesTo; 101 mock(ClientCall.Listener.class, delegatesTo(responseListener)); in serverHeaderDeliveredToClient()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/ |
D | ClientInterceptorsTest.java | 26 import static org.mockito.AdditionalAnswers.delegatesTo; 96 mock(ClientInterceptor.class, delegatesTo(new NoopInterceptor())); in channelAndInterceptorCalled() 221 mock(ClientInterceptor.class, delegatesTo(new ClientInterceptor() { in callOptions() 402 mock(ClientInterceptor.class, delegatesTo(new NoopInterceptor())); in customOptionAccessible()
|
D | ServerInterceptorsTest.java | 23 import static org.mockito.AdditionalAnswers.delegatesTo; 124 mock(ServerInterceptor.class, delegatesTo(new NoopInterceptor())); in multipleInvocationsOfHandler()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | AbstractServerStreamTest.java | 21 import static org.mockito.AdditionalAnswers.delegatesTo; 290 InputStream input = mock(InputStream.class, delegatesTo(new ByteArrayInputStream(new byte[1]))); in writeMessage_closesStream()
|
D | RetriableStreamTest.java | 29 import static org.mockito.AdditionalAnswers.delegatesTo; 622 delegatesTo( in operationsWhileDraining() 636 delegatesTo( in operationsWhileDraining() 752 delegatesTo( in isReady_whileDraining() 769 delegatesTo( in isReady_whileDraining() 830 delegatesTo( in closedWhileDraining()
|
D | AbstractClientStreamTest.java | 27 import static org.mockito.AdditionalAnswers.delegatesTo; 421 InputStream input = mock(InputStream.class, delegatesTo(new ByteArrayInputStream(new byte[1]))); in writeMessage_closesStream()
|
D | ServerImplTest.java | 30 import static org.mockito.AdditionalAnswers.delegatesTo; 166 delegatesTo(new HandlerRegistry() {
|
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/ |
D | NettyHandlerTestBase.java | 22 import static org.mockito.AdditionalAnswers.delegatesTo; 116 frameWriter = mock(Http2FrameWriter.class, delegatesTo(new DefaultHttp2FrameWriter())); in initChannel() 147 eventLoop = mock(EventLoop.class, delegatesTo(realEventLoop)); in createEventLoop()
|
D | NettyServerHandlerTest.java | 38 import static org.mockito.AdditionalAnswers.delegatesTo; 125 mock(ServerTransportListener.class, delegatesTo(new ServerTransportListenerImpl())); 192 mock(KeepAliveManager.class, delegatesTo(handler().getKeepAliveManagerForTest())); in manualSetUp()
|
/external/mockito/src/main/java/org/mockito/ |
D | AdditionalAnswers.java | 296 public static <T> Answer<T> delegatesTo(Object delegate) { in delegatesTo() method in AdditionalAnswers
|
/external/grpc-grpc-java/grpclb/src/test/java/io/grpc/grpclb/ |
D | GrpclbLoadBalancerTest.java | 32 import static org.mockito.AdditionalAnswers.delegatesTo; 181 mockLbService = mock(LoadBalancerGrpc.LoadBalancerImplBase.class, delegatesTo( in setUp()
|