Package org.mockito.internal.invocation
Class InvocationsFinder
java.lang.Object
org.mockito.internal.invocation.InvocationsFinder
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<Invocation> findAllMatchingUnverifiedChunks(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext orderingContext) static InvocationfindFirstMatchingUnverifiedInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) static InvocationfindFirstUnverified(List<Invocation> invocations) static InvocationfindFirstUnverifiedInOrder(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 InvocationfindPreviousVerifiedInOrder(List<Invocation> invocations, InOrderContext context) static InvocationfindSimilarInvocation(List<Invocation> invocations, MatchableInvocation wanted) getAllLocations(List<Invocation> invocations) static LocationgetLastLocation(List<Invocation> invocations)
-
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 -
findFirstMatchingUnverifiedInvocation
public static Invocation findFirstMatchingUnverifiedInvocation(List<Invocation> invocations, MatchableInvocation wanted, InOrderContext context) -
findSimilarInvocation
public static Invocation findSimilarInvocation(List<Invocation> invocations, MatchableInvocation wanted) -
findFirstUnverified
-
getLastLocation
-
findPreviousVerifiedInOrder
public static Invocation findPreviousVerifiedInOrder(List<Invocation> invocations, InOrderContext context) -
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-
-