/external/mockito/src/main/java/org/mockito/internal/invocation/ |
D | InvocationsFinder.java | 23 …public static List<Invocation> findInvocations(List<Invocation> invocations, MatchableInvocation w… in findInvocations() argument 24 return ListUtil.filter(invocations, new RemoveNotMatching(wanted)); in findInvocations() 27 …public static List<Invocation> findAllMatchingUnverifiedChunks(List<Invocation> invocations, Match… in findAllMatchingUnverifiedChunks() argument 28 List<Invocation> unverified = removeVerifiedInOrder(invocations, orderingContext); in findAllMatchingUnverifiedChunks() 47 …public static List<Invocation> findMatchingChunk(List<Invocation> invocations, MatchableInvocation… in findMatchingChunk() argument 48 List<Invocation> unverified = removeVerifiedInOrder(invocations, context); in findMatchingChunk() 52 return findAllMatchingUnverifiedChunks(invocations, wanted, context); in findMatchingChunk() 70 …public static Invocation findFirstMatchingUnverifiedInvocation(List<Invocation> invocations, Match… in findFirstMatchingUnverifiedInvocation() argument 71 for( Invocation invocation : removeVerifiedInOrder( invocations, context )){ in findFirstMatchingUnverifiedInvocation() 79 …public static Invocation findSimilarInvocation(List<Invocation> invocations, MatchableInvocation w… in findSimilarInvocation() argument [all …]
|
/external/mockito/src/test/java/org/mockito/internal/invocation/ |
D | InvocationsFinderTest.java | 31 private LinkedList<Invocation> invocations = new LinkedList<Invocation>(); field in InvocationsFinderTest 46 …invocations.addAll(Arrays.asList(simpleMethodInvocation, simpleMethodInvocationTwo, differentMetho… in setup() 52 …List<Invocation> actual = InvocationsFinder.findInvocations(invocations, new InvocationMatcher(sim… in shouldFindActualInvocations() 55 …actual = InvocationsFinder.findInvocations(invocations, new InvocationMatcher(differentMethodInvoc… in shouldFindActualInvocations() 61 assertSame(simpleMethodInvocation, InvocationsFinder.findFirstUnverified(invocations)); in shouldFindFirstUnverifiedInvocation() 66 assertSame(differentMethodInvocation, InvocationsFinder.findFirstUnverified(invocations)); in shouldFindFirstUnverifiedInvocation() 69 assertNull(InvocationsFinder.findFirstUnverified(invocations)); in shouldFindFirstUnverifiedInvocation() 76 …rtSame(simpleMethodInvocation, InvocationsFinder.findFirstUnverifiedInOrder(context, invocations)); in shouldFindFirstUnverifiedInOrder() 83 …ame(differentMethodInvocation, InvocationsFinder.findFirstUnverifiedInOrder(context, invocations)); in shouldFindFirstUnverifiedInOrder() 89 assertNull(InvocationsFinder.findFirstUnverifiedInOrder(context, invocations)); in shouldFindFirstUnverifiedInOrder() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/verification/ |
D | DefaultRegisteredInvocations.java | 23 private final LinkedList<Invocation> invocations = new LinkedList<Invocation>(); field in DefaultRegisteredInvocations 26 synchronized (invocations) { in add() 27 invocations.add(invocation); in add() 33 synchronized (invocations) { in removeLast() 34 if (! invocations.isEmpty()) { in removeLast() 35 invocations.removeLast(); in removeLast() 42 synchronized (invocations) { in getAll() 43 copiedList = new LinkedList<Invocation>(invocations) ; in getAll() 50 synchronized (invocations) { in clear() 51 invocations.clear(); in clear() [all …]
|
D | Only.java | 26 List<Invocation> invocations = data.getAllInvocations(); in verify() local 27 List<Invocation> chunk = findInvocations(invocations,target); in verify() 28 if (invocations.size() != 1 && chunk.size() > 0) { in verify() 29 Invocation unverified = findFirstUnverified(invocations); in verify() 30 throw noMoreInteractionsWanted(unverified, (List) invocations); in verify() 32 if (invocations.size() != 1 || chunk.size() == 0) { in verify()
|
D | VerificationDataImpl.java | 21 private final InvocationContainer invocations; field in VerificationDataImpl 23 public VerificationDataImpl(InvocationContainer invocations, InvocationMatcher wanted) { in VerificationDataImpl() argument 24 this.invocations = invocations; in VerificationDataImpl() 31 return invocations.getInvocations(); in getAllInvocations()
|
/external/mockito/src/test/java/org/mockito/internal/verification/checkers/ |
D | NumberOfInvocationsInOrderCheckerTest.java | 33 private List<Invocation> invocations; field in NumberOfInvocationsInOrderCheckerTest 51 invocations = emptyList(); in shouldPassIfWantedIsZeroAndMatchingChunkIsEmpty() 53 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 0, context); in shouldPassIfWantedIsZeroAndMatchingChunkIsEmpty() 59 invocations = asList(buildSimpleMethod().toInvocation()); in shouldPassIfChunkMatches() 60 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 1, context); in shouldPassIfChunkMatches() 69 invocations = asList(first, second); in shouldReportTooLittleInvocations() 76 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 4, context); in shouldReportTooLittleInvocations() 83 invocations = asList(invocation); in shouldMarkAsVerifiedInOrder() 87 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 1, context); in shouldMarkAsVerifiedInOrder() 94 … invocations = asList(buildSimpleMethod().toInvocation(), buildSimpleMethod().toInvocation()); in shouldReportTooLittleActual() [all …]
|
D | NumberOfInvocationsCheckerTest.java | 36 private List<Invocation> invocations; field in NumberOfInvocationsCheckerTest 50 … invocations = asList(buildSimpleMethod().toInvocation(), buildSimpleMethod().toInvocation()); in shouldReportTooLittleActual() 57 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 100); in shouldReportTooLittleActual() 63 … invocations = asList(buildSimpleMethod().toInvocation(), buildSimpleMethod().toInvocation()); in shouldReportWithLastInvocationStackTrace() 71 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 100); in shouldReportWithLastInvocationStackTrace() 76 invocations = emptyList(); in shouldNotReportWithLastInvocationStackTraceIfNoInvocationsFound() 85 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 100); in shouldNotReportWithLastInvocationStackTraceIfNoInvocationsFound() 94 invocations = asList(first, second, third); in shouldReportWithFirstUndesiredInvocationStackTrace() 99 NumberOfInvocationsChecker.checkNumberOfInvocations(invocations, wanted, 2); in shouldReportWithFirstUndesiredInvocationStackTrace() 107 invocations = asList(first, second); in shouldReportTooManyActual() [all …]
|
D | MissingInvocationInOrderCheckerTest.java | 34 private List<Invocation> invocations; field in MissingInvocationInOrderCheckerTest 54 invocations = asList(buildSimpleMethod().toInvocation()); in shouldPassWhenMatchingInteractionFound() 57 checkMissingInvocation(invocations, wanted, context); in shouldPassWhenMatchingInteractionFound() 62 invocations = asList(buildDifferentMethod().toInvocation()); in shouldReportWantedButNotInvoked() 69 checkMissingInvocation(invocations, wanted, context); in shouldReportWantedButNotInvoked() 74 invocations = asList(buildIntArgMethod().arg(1111).toInvocation()); in shouldReportArgumentsAreDifferent() 84 checkMissingInvocation(invocations, wanted, context); in shouldReportArgumentsAreDifferent() 95 invocations = asList(invocation1,invocation2); in shouldReportWantedDiffersFromActual() 106 checkMissingInvocation(invocations, wanted, context); in shouldReportWantedDiffersFromActual()
|
D | MissingInvocationCheckerTest.java | 26 private List<Invocation> invocations; field in MissingInvocationCheckerTest 37 invocations = asList(buildSimpleMethod().toInvocation()); in shouldPassBecauseActualInvocationFound() 39 MissingInvocationChecker.checkMissingInvocation(invocations, wanted); in shouldPassBecauseActualInvocationFound() 45 invocations = asList(buildDifferentMethod().toInvocation()); in shouldReportWantedButNotInvoked() 53 MissingInvocationChecker.checkMissingInvocation(invocations, wanted); in shouldReportWantedButNotInvoked() 59 invocations = asList(buildIntArgMethod().arg(1111).toInvocation()); in shouldReportWantedInvocationDiffersFromActual() 68 MissingInvocationChecker.checkMissingInvocation(invocations, wanted); in shouldReportWantedInvocationDiffersFromActual()
|
/external/mockito/src/main/java/org/mockito/internal/verification/checkers/ |
D | MissingInvocationChecker.java | 29 …public static void checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted… in checkMissingInvocation() argument 30 List<Invocation> actualInvocations = findInvocations(invocations, wanted); in checkMissingInvocation() 36 Invocation similar = findSimilarInvocation(invocations, wanted); in checkMissingInvocation() 38 throw wantedButNotInvoked(wanted, invocations); in checkMissingInvocation() 47 …public static void checkMissingInvocation(List<Invocation> invocations, MatchableInvocation wanted… in checkMissingInvocation() argument 48 List<Invocation> chunk = findAllMatchingUnverifiedChunks(invocations, wanted, context); in checkMissingInvocation() 54 Invocation previousInOrder = findPreviousVerifiedInOrder(invocations, context); in checkMissingInvocation() 59 checkMissingInvocation(invocations, wanted); in checkMissingInvocation()
|
D | NumberOfInvocationsChecker.java | 32 …public static void checkNumberOfInvocations(List<Invocation> invocations, MatchableInvocation want… in checkNumberOfInvocations() argument 33 List<Invocation> actualInvocations = findInvocations(invocations, wanted); in checkNumberOfInvocations() 52 …public static void checkNumberOfInvocations(List<Invocation> invocations, MatchableInvocation want… in checkNumberOfInvocations() argument 53 List<Invocation> chunk = findMatchingChunk(invocations, wanted, wantedCount, context); in checkNumberOfInvocations() 69 …public static void checkNumberOfInvocationsNonGreedy(List<Invocation> invocations, MatchableInvoca… in checkNumberOfInvocationsNonGreedy() argument 73 Invocation next = findFirstMatchingUnverifiedInvocation(invocations, wanted, context ); in checkNumberOfInvocationsNonGreedy()
|
/external/mockito/src/test/java/org/mockito/internal/verification/ |
D | DefaultRegisteredInvocationsTest.java | 19 private DefaultRegisteredInvocations invocations; field in DefaultRegisteredInvocationsTest 23 invocations = new DefaultRegisteredInvocations(); in setup() 31 invocations.add(toString); in should_not_return_to_string_method() 32 invocations.add(simpleMethod); in should_not_return_to_string_method() 34 assertTrue(invocations.getAll().contains(simpleMethod)); in should_not_return_to_string_method() 35 assertFalse(invocations.getAll().contains(toString)); in should_not_return_to_string_method()
|
/external/testng/src/test/java/test/retryAnalyzer/ |
D | InvocationCountTest.java | 23 static final Multiset<String> invocations = ConcurrentHashMultiset.create(); field in InvocationCountTest 62 assertEquals(invocations.count("testAnnotationWithNoRetries"), 0); in checkInvocationCounts() 63 assertEquals(invocations.count("testAnnotationWithOneRetry"), 1); in checkInvocationCounts() 64 assertEquals(invocations.count("testAnnotationWithSevenRetries"), 7); in checkInvocationCounts() 65 assertEquals(invocations.count("failAfterThreeRetries"), 4); in checkInvocationCounts() 116 invocations.add(result.getName()); in retry() 125 invocations.add(result.getName()); in retry()
|
/external/mockito/src/test/java/org/mockito/internal/ |
D | AllInvocationsFinderTest.java | 52 List<Invocation> invocations = find(asList(mockOne, mockTwo)); in provides_invocations_in_order() local 55 assertEquals(3, invocations.size()); in provides_invocations_in_order() 56 assertArgumentEquals(100, invocations.get(0)); in provides_invocations_in_order() 57 assertArgumentEquals(200, invocations.get(1)); in provides_invocations_in_order() 58 assertArgumentEquals(300, invocations.get(2)); in provides_invocations_in_order() 67 List<Invocation> invocations = find(asList(mockOne, mockOne, mockOne)); in deduplicates_interactions_from_the_same_mock() local 70 assertEquals(1, invocations.size()); in deduplicates_interactions_from_the_same_mock()
|
/external/mockito/src/main/java/org/mockito/internal/debugging/ |
D | MockitoDebuggerImpl.java | 26 List<Invocation> invocations = AllInvocationsFinder.find(asList(mocks)); in printInvocations() local 30 for(Invocation i:invocations) { in printInvocations() 38 invocations = unusedStubsFinder.find(asList(mocks)); in printInvocations() 39 if (invocations.isEmpty()) { in printInvocations() 46 for(Invocation i:invocations) { in printInvocations()
|
/external/mockftpserver/tags/2.0.1/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.0-rc1/MockFtpServer/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.0/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.4/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.5/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.2/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/MockFtpServer/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.0.2/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.1/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|
/external/mockftpserver/tags/2.3/src/main/java/org/mockftpserver/core/command/ |
D | AbstractTrackingCommandHandler.java | 37 private List invocations = new ArrayList(); field in AbstractTrackingCommandHandler 59 invocations.add(invocationRecord); in handleCommand() 134 return invocations.size(); in numberOfInvocations() 148 return (InvocationRecord) invocations.get(index); in getInvocation() 158 invocations.clear(); in clearInvocations()
|