Home
last modified time | relevance | path

Searched refs:invocation (Results 1 – 25 of 267) sorted by relevance

1234567891011

/external/mockito/src/org/mockito/internal/stubbing/answers/
DReturnsArgumentAt.java8 import org.mockito.invocation.InvocationOnMock;
40 public Object answer(InvocationOnMock invocation) throws Throwable { in answer() argument
41 validateIndexWithinInvocationRange(invocation); in answer()
42 return invocation.getArguments()[actualArgumentPosition(invocation)]; in answer()
46 private int actualArgumentPosition(InvocationOnMock invocation) { in actualArgumentPosition() argument
48 lastArgumentIndexOf(invocation) : in actualArgumentPosition()
49 argumentIndexOf(invocation); in actualArgumentPosition()
56 private int argumentIndexOf(InvocationOnMock invocation) { in argumentIndexOf() argument
60 private int lastArgumentIndexOf(InvocationOnMock invocation) { in lastArgumentIndexOf() argument
61 return invocation.getArguments().length - 1; in lastArgumentIndexOf()
[all …]
DAnswersValidator.java8 import org.mockito.invocation.Invocation;
15 public void validate(Answer<?> answer, Invocation invocation) { in validate() argument
16 MethodInfo methodInfo = new MethodInfo(invocation); in validate()
35 validateReturnArgIdentity(returnsArgumentAt, invocation); in validate()
39 …rivate void validateReturnArgIdentity(ReturnsArgumentAt returnsArgumentAt, Invocation invocation) { in validateReturnArgIdentity() argument
40 returnsArgumentAt.validateIndexWithinInvocationRange(invocation); in validateReturnArgIdentity()
42 MethodInfo methodInfo = new MethodInfo(invocation); in validateReturnArgIdentity()
43 if (!methodInfo.isValidReturnType(returnsArgumentAt.returnedTypeOnSignature(invocation))) { in validateReturnArgIdentity()
44 … new Reporter().wrongTypeOfArgumentToReturn(invocation, methodInfo.printMethodReturnType(), in validateReturnArgIdentity()
45 … returnsArgumentAt.returnedTypeOnSignature(invocation), in validateReturnArgIdentity()
/external/mockito/src/org/mockito/internal/invocation/
DInvocationMatcher.java6 package org.mockito.internal.invocation;
19 import org.mockito.invocation.DescribedInvocation;
20 import org.mockito.invocation.Invocation;
21 import org.mockito.invocation.Location;
27 private final Invocation invocation; field in InvocationMatcher
30 public InvocationMatcher(Invocation invocation, List<Matcher> matchers) { in InvocationMatcher() argument
31 this.invocation = invocation; in InvocationMatcher()
33 this.matchers = ArgumentsProcessor.argumentsToMatchers(invocation.getArguments()); in InvocationMatcher()
39 public InvocationMatcher(Invocation invocation) { in InvocationMatcher() argument
40 this(invocation, Collections.<Matcher>emptyList()); in InvocationMatcher()
[all …]
DInvocationsFinder.java6 package org.mockito.internal.invocation;
14 import org.mockito.invocation.Invocation;
15 import org.mockito.invocation.Location;
56 for (Invocation invocation : unverified) { in getFirstMatchingChunk()
57 if (wanted.matches(invocation)) { in getFirstMatchingChunk()
58 firstChunk.add(invocation); in getFirstMatchingChunk()
67 for( Invocation invocation : removeVerifiedInOrder( invocations, context )){ in findFirstMatchingUnverifiedInvocation()
68 if( wanted.matches( invocation )){ in findFirstMatchingUnverifiedInvocation()
69 return invocation; in findFirstMatchingUnverifiedInvocation()
77 for (Invocation invocation : invocations) { in findSimilarInvocation()
[all …]
DInvocationMarker.java5 package org.mockito.internal.invocation;
10 import org.mockito.invocation.Invocation;
15 for (Invocation invocation : invocations) { in markVerified()
16 markVerified(invocation, wanted); in markVerified()
20 public void markVerified(Invocation invocation, CapturesArgumensFromInvocation wanted) { in markVerified() argument
21 invocation.markVerified(); in markVerified()
22 wanted.captureArgumentsFrom(invocation); in markVerified()
DMatchersBinder.java6 package org.mockito.internal.invocation;
12 import org.mockito.invocation.Invocation;
22 …ocationMatcher bindMatchers(ArgumentMatcherStorage argumentMatcherStorage, Invocation invocation) { in bindMatchers() argument
24 validateMatchers(invocation, lastMatchers); in bindMatchers()
26 …InvocationMatcher invocationWithMatchers = new InvocationMatcher(invocation, (List<Matcher>)(List)… in bindMatchers()
30 private void validateMatchers(Invocation invocation, List<LocalizedMatcher> lastMatchers) { in validateMatchers() argument
33 int expectedMatchersSize = invocation.getArguments().length; in validateMatchers()
/external/mockito/src/org/mockito/internal/listeners/
DNotifiedMethodInvocationReport.java7 import org.mockito.invocation.DescribedInvocation;
8 import org.mockito.invocation.Invocation;
15 private final Invocation invocation; field in NotifiedMethodInvocationReport
27 public NotifiedMethodInvocationReport(Invocation invocation, Object returnedValue) { in NotifiedMethodInvocationReport() argument
28 this.invocation = invocation; in NotifiedMethodInvocationReport()
39 public NotifiedMethodInvocationReport(Invocation invocation, Throwable throwable) { in NotifiedMethodInvocationReport() argument
40 this.invocation = invocation; in NotifiedMethodInvocationReport()
45 return invocation; in getInvocation()
61 … return (invocation.stubInfo() == null) ? null : invocation.stubInfo().stubbedAt().toString(); in getLocationOfStubbing()
71 …if (invocation != null ? !invocation.equals(that.invocation) : that.invocation != null) return fal… in equals()
[all …]
/external/easymock/src/org/easymock/internal/
DExpectedInvocation.java31 private final Invocation invocation; field in ExpectedInvocation
38 public ExpectedInvocation(Invocation invocation, in ExpectedInvocation() argument
40 this(invocation, matchers, null); in ExpectedInvocation()
43 private ExpectedInvocation(Invocation invocation, in ExpectedInvocation() argument
46 this.invocation = invocation; in ExpectedInvocation()
48 this.matchers = (matcher == null) ? createMissingMatchers(invocation, in ExpectedInvocation()
52 private List<IArgumentMatcher> createMissingMatchers(Invocation invocation, in createMissingMatchers() argument
55 if (matchers.size() != invocation.getArguments().length) { in createMissingMatchers()
57 + invocation.getArguments().length in createMissingMatchers()
64 for (Object argument : invocation.getArguments()) { in createMissingMatchers()
[all …]
/external/mockito/src/org/mockito/internal/stubbing/
DInvocationContainerImpl.java7 import org.mockito.internal.invocation.InvocationMatcher;
8 import org.mockito.internal.invocation.StubInfoImpl;
14 import org.mockito.invocation.Invocation;
39 public void setInvocationForPotentialStubbing(InvocationMatcher invocation) { in setInvocationForPotentialStubbing() argument
40 registeredInvocations.add(invocation.getInvocation()); in setInvocationForPotentialStubbing()
41 this.invocationForStubbing = invocation; in setInvocationForPotentialStubbing()
58 Invocation invocation = invocationForStubbing.getInvocation(); in addAnswer() local
59 mockingProgress.stubbingCompleted(invocation); in addAnswer()
61 answersValidator.validate(answer, invocation); in addAnswer()
72 Object answerTo(Invocation invocation) throws Throwable { in answerTo() argument
[all …]
DStubbedInvocationMatcher.java11 import org.mockito.internal.invocation.InvocationMatcher;
12 import org.mockito.invocation.DescribedInvocation;
13 import org.mockito.invocation.InvocationOnMock;
23 public StubbedInvocationMatcher(InvocationMatcher invocation, Answer answer) { in StubbedInvocationMatcher() argument
24 super(invocation.getInvocation(), invocation.getMatchers()); in StubbedInvocationMatcher()
28 public Object answer(InvocationOnMock invocation) throws Throwable { in answer() argument
34 return a.answer(invocation); in answer()
/external/clang/unittests/Frontend/
DFrontendActionTest.cpp66 CompilerInvocation *invocation = new CompilerInvocation; in TEST() local
67 invocation->getPreprocessorOpts().addRemappedFile( in TEST()
69 invocation->getFrontendOpts().Inputs.push_back(FrontendInputFile("test.cc", in TEST()
71 invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly; in TEST()
72 invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu"; in TEST()
74 compiler.setInvocation(invocation); in TEST()
85 CompilerInvocation *invocation = new CompilerInvocation; in TEST() local
86 invocation->getPreprocessorOpts().addRemappedFile( in TEST()
88 invocation->getFrontendOpts().Inputs.push_back(FrontendInputFile("test.cc", in TEST()
90 invocation->getFrontendOpts().ProgramAction = frontend::ParseSyntaxOnly; in TEST()
[all …]
/external/mockito/src/org/mockito/internal/verification/
DSingleRegisteredInvocation.java8 import org.mockito.invocation.Invocation;
16 private Invocation invocation; field in SingleRegisteredInvocation
18 public void add(Invocation invocation) { in add() argument
19 this.invocation = invocation; in add()
23 invocation = null; in removeLast()
31 return invocation == null; in isEmpty()
DDefaultRegisteredInvocations.java11 import org.mockito.invocation.Invocation;
23 public void add(Invocation invocation) { in add() argument
25 invocations.add(invocation); in add()
54 public boolean isOut(Invocation invocation) { in isOut() argument
55 return new ObjectMethodsGuru().isToString(invocation.getMethod()); in isOut()
/external/mockito/src/org/mockito/internal/handler/
DInvocationNotifierHandler.java11 import org.mockito.invocation.Invocation;
12 import org.mockito.invocation.MockHandler;
36 public Object handle(Invocation invocation) throws Throwable { in handle() argument
38 Object returnedValue = mockHandler.handle(invocation); in handle()
39 notifyMethodCall(invocation, returnedValue); in handle()
42 notifyMethodCallException(invocation, t); in handle()
48 private void notifyMethodCall(Invocation invocation, Object returnValue) { in notifyMethodCall() argument
51 … listener.reportInvocation(new NotifiedMethodInvocationReport(invocation, returnValue)); in notifyMethodCall()
58 private void notifyMethodCallException(Invocation invocation, Throwable exception) { in notifyMethodCallException() argument
61 … listener.reportInvocation(new NotifiedMethodInvocationReport(invocation, exception)); in notifyMethodCallException()
DMockHandlerImpl.java9 import org.mockito.internal.invocation.InvocationMatcher;
10 import org.mockito.internal.invocation.MatchersBinder;
16 import org.mockito.invocation.Invocation;
47 public Object handle(Invocation invocation) throws Throwable { in handle() argument
52 invocation in handle()
61 invocation in handle()
70 if (((MockAwareVerificationMode) verificationMode).getMock() == invocation.getMock()) { in handle()
87 … StubbedInvocationMatcher stubbedInvocation = invocationContainerImpl.findAnswerFor(invocation); in handle()
90 stubbedInvocation.captureArgumentsFrom(invocation); in handle()
91 return stubbedInvocation.answer(invocation); in handle()
[all …]
/external/mockito/src/org/mockito/internal/reporting/
DPrintSettings.java8 import org.mockito.internal.invocation.ArgumentsProcessor;
9 import org.mockito.internal.invocation.InvocationMatcher;
12 import org.mockito.invocation.Invocation;
46 public String print(List<Matcher> matchers, Invocation invocation) { in print() argument
48 …String qualifiedName = new MockUtil().getMockName(invocation.getMock()) + "." + invocation.getMeth… in print()
57 public String print(Invocation invocation) { in print() argument
58 return print(ArgumentsProcessor.argumentsToMatchers(invocation.getArguments()), invocation); in print()
/external/chromium_org/third_party/ocmock/OCMock/
DOCMConstraint.m32 NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
33 [invocation setTarget:anObject];
34 [invocation setSelector:aSelector];
35 constraint->invocation = invocation;
42 if([[constraint->invocation methodSignature] numberOfArguments] < 4)
44 [constraint->invocation setArgument:&aValue atIndex:3];
111 [invocation setArgument:&value atIndex:2]; // should test if constraint takes arg
112 [invocation invoke];
114 [invocation getReturnValue:&returnValue];
/external/mockito/src/org/mockito/internal/stubbing/defaultanswers/
DReturnsDeepStubs.java15 import org.mockito.invocation.InvocationOnMock;
47 public Object answer(InvocationOnMock invocation) throws Throwable { in answer() argument
49 … actualParameterizedType(invocation.getMock()).resolveGenericReturnType(invocation.getMethod()); in answer()
56 return getMock(invocation, returnTypeGenericMetadata); in answer()
59 …private Object getMock(InvocationOnMock invocation, GenericMetadataSupport returnTypeGenericMetada… in getMock() argument
60 InternalMockHandler<Object> handler = new MockUtil().getMockHandler(invocation.getMock()); in getMock()
66 return stubbedInvocationMatcher.answer(invocation); in getMock()
113 public Object answer(InvocationOnMock invocation) throws Throwable {
DReturnsSmartNulls.java13 import org.mockito.invocation.Location;
15 import org.mockito.invocation.InvocationOnMock;
42 public Object answer(final InvocationOnMock invocation) throws Throwable { in answer() argument
43 Object defaultReturnValue = delegate.answer(invocation); in answer()
47 Class<?> type = invocation.getMethod().getReturnType(); in answer()
50 return Mockito.mock(type, new ThrowsSmartNullPointer(invocation, location)); in answer()
/external/mockito/src/org/mockito/internal/creation/
DMethodInterceptorFilter.java12 import org.mockito.internal.invocation.InvocationImpl;
13 import org.mockito.internal.invocation.MockitoMethod;
14 import org.mockito.internal.invocation.SerializableMethod;
15 import org.mockito.internal.invocation.realmethod.FilteredCGLIBProxyRealMethod;
18 import org.mockito.invocation.Invocation;
19 import org.mockito.invocation.MockHandler;
60 …Invocation invocation = new InvocationImpl(proxy, mockitoMethod, args, SequenceNumber.next(), real… in intercept() local
61 return handler.handle(invocation); in intercept()
/external/chromium_org/tools/gn/
Dtemplate.cc28 const FunctionCallNode* invocation, in Invoke() argument
34 if (!EnsureNotProcessingImport(invocation, scope, err)) in Invoke()
40 if (!FillTargetBlockScope(scope, invocation, in Invoke()
41 invocation->function().value().as_string(), in Invoke()
71 invocation); in Invoke()
78 Value(invocation, args[0].string_value()), in Invoke()
79 invocation); in Invoke()
/external/deqp/doc/testspecs/GLES31/
Dfunctional.synchronization.txt26 + In-invocation synchronization
27 - Test synchronization primitives within a single invocation.
29 + Inter-invocation synchronization
37 - Inter-invocation synchronization without use of barrier()
42 In-invocation synchronization tests read and write to a coherent image or
43 buffer within a single invocation. Data accessed by a single invocation is not
48 Inter-invocation synchronization tests read and write to a coherent image or
49 buffer within a single work group. Data accessed by a single invocation is also
50 accessed by another invocation within the work group. Accesses are synchronized
/external/mockito/src/org/mockito/exceptions/
DReporter.java19 import org.mockito.invocation.DescribedInvocation;
20 import org.mockito.invocation.Invocation;
21 import org.mockito.invocation.InvocationOnMock;
22 import org.mockito.invocation.Location;
512 public void smartNullPointerException(String invocation, Location location) { in smartNullPointerException() argument
518 invocation, in smartNullPointerException()
697 …public int invalidArgumentPositionRangeAtInvocationTime(InvocationOnMock invocation, boolean willR… in invalidArgumentPositionRangeAtInvocationTime() argument
700 …" -> " + new MockUtil().getMockName(invocation.getMock()) + "." + invocation.getMethod().getName()… in invalidArgumentPositionRangeAtInvocationTime()
704 … "Wanted parameter at position " + argumentIndex) + " but " + possibleArgumentTypesOf(invocation), in invalidArgumentPositionRangeAtInvocationTime()
710 private StringBuilder possibleArgumentTypesOf(InvocationOnMock invocation) { in possibleArgumentTypesOf() argument
[all …]
/external/mockito/src/org/mockito/internal/verification/checkers/
DAtLeastXNumberOfInvocationsChecker.java11 import org.mockito.internal.invocation.InvocationMatcher;
12 import org.mockito.internal.invocation.InvocationMarker;
13 import org.mockito.internal.invocation.InvocationsFinder;
14 import org.mockito.invocation.Invocation;
15 import org.mockito.invocation.Location;
DAtLeastXNumberOfInvocationsInOrderChecker.java11 import org.mockito.internal.invocation.InvocationMarker;
12 import org.mockito.internal.invocation.InvocationMatcher;
13 import org.mockito.internal.invocation.InvocationsFinder;
15 import org.mockito.invocation.Invocation;
16 import org.mockito.invocation.Location;

1234567891011