org.mockito.internal.invocation
Class InvocationsFinder
java.lang.Object
org.mockito.internal.invocation.InvocationsFinder
public class InvocationsFinder
- extends java.lang.Object
Method Summary |
java.util.List<Invocation> |
findAllMatchingUnverifiedChunks(java.util.List<Invocation> invocations,
InvocationMatcher wanted,
InOrderContext orderingContext)
|
Invocation |
findFirstMatchingUnverifiedInvocation(java.util.List<Invocation> invocations,
InvocationMatcher wanted,
InOrderContext context)
|
Invocation |
findFirstUnverified(java.util.List<Invocation> invocations)
|
Invocation |
findFirstUnverifiedInOrder(InOrderContext context,
java.util.List<Invocation> orderedInvocations)
i3 is unverified here:
i1, i2, i3
v
all good here:
i1, i2, i3
v v |
java.util.List<Invocation> |
findInvocations(java.util.List<Invocation> invocations,
InvocationMatcher wanted)
|
java.util.List<Invocation> |
findMatchingChunk(java.util.List<Invocation> invocations,
InvocationMatcher wanted,
int wantedCount,
InOrderContext context)
some examples how it works:
Given invocations sequence:
1,1,2,1
if wanted is 1 and mode is times(2) then returns
1,1
if wanted is 1 and mode is atLeast() then returns
1,1,1
if wanted is 1 and mode is times(x), where x != 2 then returns
1,1,1 |
Invocation |
findPreviousVerifiedInOrder(java.util.List<Invocation> invocations,
InOrderContext context)
|
Invocation |
findSimilarInvocation(java.util.List<Invocation> invocations,
InvocationMatcher wanted)
|
Location |
getLastLocation(java.util.List<Invocation> invocations)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvocationsFinder
public InvocationsFinder()
findInvocations
public java.util.List<Invocation> findInvocations(java.util.List<Invocation> invocations,
InvocationMatcher wanted)
findAllMatchingUnverifiedChunks
public java.util.List<Invocation> findAllMatchingUnverifiedChunks(java.util.List<Invocation> invocations,
InvocationMatcher wanted,
InOrderContext orderingContext)
findMatchingChunk
public java.util.List<Invocation> findMatchingChunk(java.util.List<Invocation> invocations,
InvocationMatcher wanted,
int wantedCount,
InOrderContext context)
- some examples how it works:
Given invocations sequence:
1,1,2,1
if wanted is 1 and mode is times(2) then returns
1,1
if wanted is 1 and mode is atLeast() then returns
1,1,1
if wanted is 1 and mode is times(x), where x != 2 then returns
1,1,1
findFirstMatchingUnverifiedInvocation
public Invocation findFirstMatchingUnverifiedInvocation(java.util.List<Invocation> invocations,
InvocationMatcher wanted,
InOrderContext context)
findSimilarInvocation
public Invocation findSimilarInvocation(java.util.List<Invocation> invocations,
InvocationMatcher wanted)
findFirstUnverified
public Invocation findFirstUnverified(java.util.List<Invocation> invocations)
getLastLocation
public Location getLastLocation(java.util.List<Invocation> invocations)
findPreviousVerifiedInOrder
public Invocation findPreviousVerifiedInOrder(java.util.List<Invocation> invocations,
InOrderContext context)
findFirstUnverifiedInOrder
public Invocation findFirstUnverifiedInOrder(InOrderContext context,
java.util.List<Invocation> orderedInvocations)
- i3 is unverified here:
i1, i2, i3
v
all good here:
i1, i2, i3
v v
- Parameters:
context
- orderedInvocations
-