Package org.mockito.internal.invocation
Class InvocationsFinder
java.lang.Object
org.mockito.internal.invocation.InvocationsFinder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List
<Invocation> findAllMatchingUnverifiedChunks
(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext) static Invocation
findFirstMatchingUnverifiedInvocation
(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) static Invocation
findFirstUnverified
(List<Invocation> invocations) (package private) static Invocation
findFirstUnverified
(List<Invocation> invocations, Object mock) static Invocation
findFirstUnverifiedInOrder
(InOrderContext context, List<Invocation> orderedInvocations) i3 is unverified here: i1, i2, i3 v all good here: i1, i2, i3 v vstatic List
<Invocation> findInvocations
(List<Invocation> invocations, MatchableInvocation wanted) static List
<Invocation> findMatchingChunk
(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
(List<Invocation> invocations, InOrderContext context) static Invocation
findSimilarInvocation
(List<Invocation> invocations, MatchableInvocation wanted) getAllLocations
(List<Invocation> invocations) private static List
<Invocation> getFirstMatchingChunk
(MatchableInvocation wanted, List<Invocation> unverified) static Location
getLastLocation
(List<Invocation> invocations) private static List
<Invocation> removeVerifiedInOrder
(List<Invocation> invocations, InOrderContext orderingContext)
-
Constructor Details
-
InvocationsFinder
private InvocationsFinder()
-
-
Method Details
-
findInvocations
public static List<Invocation> findInvocations(List<Invocation> invocations, MatchableInvocation wanted) -
findAllMatchingUnverifiedChunks
public static List<Invocation> findAllMatchingUnverifiedChunks(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext) -
findMatchingChunk
public static List<Invocation> findMatchingChunk(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 List<Invocation> getFirstMatchingChunk(MatchableInvocation wanted, List<Invocation> unverified) -
findFirstMatchingUnverifiedInvocation
public static Invocation findFirstMatchingUnverifiedInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) -
findSimilarInvocation
public static Invocation findSimilarInvocation(List<Invocation> invocations, MatchableInvocation wanted) -
findFirstUnverified
-
findFirstUnverified
-
getLastLocation
-
findPreviousVerifiedInOrder
public static Invocation findPreviousVerifiedInOrder(List<Invocation> invocations, InOrderContext context) -
removeVerifiedInOrder
private static List<Invocation> removeVerifiedInOrder(List<Invocation> invocations, InOrderContext orderingContext) -
getAllLocations
-
findFirstUnverifiedInOrder
public static Invocation findFirstUnverifiedInOrder(InOrderContext context, List<Invocation> orderedInvocations) i3 is unverified here: i1, i2, i3 v all good here: i1, i2, i3 v v- Parameters:
context
-orderedInvocations
-
-