Package org.mockito.internal.invocation
Class InvocationsFinder
- java.lang.Object
-
- org.mockito.internal.invocation.InvocationsFinder
-
public class InvocationsFinder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
InvocationsFinder.RemoveNotMatching
private static class
InvocationsFinder.RemoveUnverifiedInOrder
-
Constructor Summary
Constructors Modifier Constructor Description private
InvocationsFinder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 vstatic 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,1static 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)
-
-
-
Method Detail
-
findInvocations
public static java.util.List<Invocation> findInvocations(java.util.List<Invocation> invocations, MatchableInvocation wanted)
-
findAllMatchingUnverifiedChunks
public static java.util.List<Invocation> findAllMatchingUnverifiedChunks(java.util.List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext)
-
findMatchingChunk
public 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
-
getFirstMatchingChunk
private static java.util.List<Invocation> getFirstMatchingChunk(MatchableInvocation wanted, java.util.List<Invocation> unverified)
-
findFirstMatchingUnverifiedInvocation
public static Invocation findFirstMatchingUnverifiedInvocation(java.util.List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context)
-
findSimilarInvocation
public static Invocation findSimilarInvocation(java.util.List<Invocation> invocations, MatchableInvocation wanted)
-
findFirstUnverified
public static Invocation findFirstUnverified(java.util.List<Invocation> invocations)
-
findFirstUnverified
static Invocation findFirstUnverified(java.util.List<Invocation> invocations, java.lang.Object mock)
-
getLastLocation
public static Location getLastLocation(java.util.List<Invocation> invocations)
-
findPreviousVerifiedInOrder
public static Invocation findPreviousVerifiedInOrder(java.util.List<Invocation> invocations, InOrderContext context)
-
removeVerifiedInOrder
private static java.util.List<Invocation> removeVerifiedInOrder(java.util.List<Invocation> invocations, InOrderContext orderingContext)
-
getAllLocations
public static java.util.List<Location> getAllLocations(java.util.List<Invocation> invocations)
-
findFirstUnverifiedInOrder
public 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- Parameters:
context
-orderedInvocations
-
-
-