public class InvocationsFinder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
InvocationsFinder.RemoveNotMatching |
private static class |
InvocationsFinder.RemoveUnverifiedInOrder |
Modifier | Constructor and Description |
---|---|
private |
InvocationsFinder() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Invocation> |
findAllMatchingUnverifiedChunks(java.util.List<Invocation> invocations,
MatchableInvocation wanted,
InOrderContext orderingContext) |
static Invocation |
findFirstMatchingUnverifiedInvocation(java.util.List<Invocation> invocations,
MatchableInvocation wanted,
InOrderContext context) |
static Invocation |
findFirstUnverified(java.util.List<Invocation> invocations) |
(package private) static Invocation |
findFirstUnverified(java.util.List<Invocation> invocations,
java.lang.Object mock) |
static 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
|
static java.util.List<Invocation> |
findInvocations(java.util.List<Invocation> invocations,
MatchableInvocation wanted) |
static java.util.List<Invocation> |
findMatchingChunk(java.util.List<Invocation> invocations,
MatchableInvocation 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
|
static Invocation |
findPreviousVerifiedInOrder(java.util.List<Invocation> invocations,
InOrderContext context) |
static Invocation |
findSimilarInvocation(java.util.List<Invocation> invocations,
MatchableInvocation wanted) |
static java.util.List<Location> |
getAllLocations(java.util.List<Invocation> invocations) |
private static java.util.List<Invocation> |
getFirstMatchingChunk(MatchableInvocation wanted,
java.util.List<Invocation> unverified) |
static Location |
getLastLocation(java.util.List<Invocation> invocations) |
private static java.util.List<Invocation> |
removeVerifiedInOrder(java.util.List<Invocation> invocations,
InOrderContext orderingContext) |
public static java.util.List<Invocation> findInvocations(java.util.List<Invocation> invocations, MatchableInvocation wanted)
public static java.util.List<Invocation> findAllMatchingUnverifiedChunks(java.util.List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext)
public static java.util.List<Invocation> findMatchingChunk(java.util.List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context)
private static java.util.List<Invocation> getFirstMatchingChunk(MatchableInvocation wanted, java.util.List<Invocation> unverified)
public static Invocation findFirstMatchingUnverifiedInvocation(java.util.List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context)
public static Invocation findSimilarInvocation(java.util.List<Invocation> invocations, MatchableInvocation wanted)
public static Invocation findFirstUnverified(java.util.List<Invocation> invocations)
static Invocation findFirstUnverified(java.util.List<Invocation> invocations, java.lang.Object mock)
public static Location getLastLocation(java.util.List<Invocation> invocations)
public static Invocation findPreviousVerifiedInOrder(java.util.List<Invocation> invocations, InOrderContext context)
private static java.util.List<Invocation> removeVerifiedInOrder(java.util.List<Invocation> invocations, InOrderContext orderingContext)
public static java.util.List<Location> getAllLocations(java.util.List<Invocation> invocations)
public static Invocation findFirstUnverifiedInOrder(InOrderContext context, java.util.List<Invocation> orderedInvocations)
context
- orderedInvocations
-