Home
last modified time | relevance | path

Searched refs:delegatesTo (Results 1 – 17 of 17) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/stubbing/
DStubbingWithDelegateTest.java20 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 …]
DStubbingWithDelegateVarArgsTest.java10 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/
DHelloWorldClientTest.kt20 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/
DHelloWorldClientTest.java20 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/
DGrpcCleanupRuleTest.java22 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/
DHeaderClientInterceptorTest.java21 import static org.mockito.AdditionalAnswers.delegatesTo;
66 private final ServerInterceptor mockServerInterceptor = mock(ServerInterceptor.class, delegatesTo(
DHeaderServerInterceptorTest.java21 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/
DClientInterceptorsTest.java26 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()
DServerInterceptorsTest.java23 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/
DAbstractServerStreamTest.java21 import static org.mockito.AdditionalAnswers.delegatesTo;
290 InputStream input = mock(InputStream.class, delegatesTo(new ByteArrayInputStream(new byte[1]))); in writeMessage_closesStream()
DRetriableStreamTest.java29 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()
DAbstractClientStreamTest.java27 import static org.mockito.AdditionalAnswers.delegatesTo;
421 InputStream input = mock(InputStream.class, delegatesTo(new ByteArrayInputStream(new byte[1]))); in writeMessage_closesStream()
DServerImplTest.java30 import static org.mockito.AdditionalAnswers.delegatesTo;
166 delegatesTo(new HandlerRegistry() {
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/
DNettyHandlerTestBase.java22 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()
DNettyServerHandlerTest.java38 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/
DAdditionalAnswers.java296 public static <T> Answer<T> delegatesTo(Object delegate) { in delegatesTo() method in AdditionalAnswers
/external/grpc-grpc-java/grpclb/src/test/java/io/grpc/grpclb/
DGrpclbLoadBalancerTest.java32 import static org.mockito.AdditionalAnswers.delegatesTo;
181 mockLbService = mock(LoadBalancerGrpc.LoadBalancerImplBase.class, delegatesTo( in setUp()