Class InvocationsFinder


  • public class InvocationsFinder
    extends java.lang.Object
    • Constructor Detail

      • InvocationsFinder

        private InvocationsFinder()
    • Method Detail

      • 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
      • 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)
      • 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 -