/external/webrtc/modules/rtp_rtcp/source/ |
D | rtcp_receiver_unittest.cc | 164 RtpRtcpInterface::Configuration DefaultConfiguration(ReceiverMocks* mocks) { in DefaultConfiguration() argument 166 config.clock = &mocks->clock; in DefaultConfiguration() 169 &mocks->packet_type_counter_observer; in DefaultConfiguration() 170 config.bandwidth_callback = &mocks->bandwidth_observer; in DefaultConfiguration() 171 config.intra_frame_callback = &mocks->intra_frame_observer; in DefaultConfiguration() 173 &mocks->rtcp_loss_notification_observer; in DefaultConfiguration() 174 config.transport_feedback_callback = &mocks->transport_feedback_observer; in DefaultConfiguration() 175 config.bitrate_allocation_observer = &mocks->bitrate_allocation_observer; in DefaultConfiguration() 183 ReceiverMocks mocks; in TEST() local 184 RTCPReceiver receiver(DefaultConfiguration(&mocks), &mocks.rtp_rtcp_impl); in TEST() [all …]
|
/external/mockito/src/test/java/org/mockito/internal/util/collections/ |
D | HashCodeAndEqualsSafeSetTest.java | 41 HashCodeAndEqualsSafeSet mocks = new HashCodeAndEqualsSafeSet(); in mock_with_failing_equals_method_can_be_used() local 42 mocks.add(mock1); in mock_with_failing_equals_method_can_be_used() 44 assertThat(mocks.contains(mock1)).isTrue(); in mock_with_failing_equals_method_can_be_used() 47 assertThat(mocks.contains(mock2)).isFalse(); in mock_with_failing_equals_method_can_be_used() 52 HashCodeAndEqualsSafeSet mocks = new HashCodeAndEqualsSafeSet(); in can_remove() local 54 mocks.add(mock); in can_remove() 55 mocks.remove(mock); in can_remove() 57 assertThat(mocks.isEmpty()).isTrue(); in can_remove() 63 HashCodeAndEqualsSafeSet mocks = HashCodeAndEqualsSafeSet.of( in can_add_a_collection() local 69 workingSet.addAll(mocks); in can_add_a_collection() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/filter/ |
D | NameBasedCandidateFilter.java | 21 public OngoingInjector filterCandidate(final Collection<Object> mocks, in filterCandidate() argument 25 if (mocks.size() == 1 in filterCandidate() 26 …&& anotherCandidateMatchesMockName(mocks, candidateFieldToBeInjected, allRemainingCandidateFields)… in filterCandidate() 30 …return next.filterCandidate(tooMany(mocks) ? selectMatchingName(mocks, candidateFieldToBeInjected)… in filterCandidate() 36 private boolean tooMany(Collection<Object> mocks) { in tooMany() argument 37 return mocks.size() > 1; in tooMany() 40 …private List<Object> selectMatchingName(Collection<Object> mocks, Field candidateFieldToBeInjected… in selectMatchingName() argument 42 for (Object mock : mocks) { in selectMatchingName() 59 private boolean anotherCandidateMatchesMockName(final Collection<Object> mocks, in anotherCandidateMatchesMockName() argument 62 String mockName = getMockName(mocks.iterator().next()).toString(); in anotherCandidateMatchesMockName()
|
D | TerminalMockCandidateFilter.java | 25 public OngoingInjector filterCandidate(final Collection<Object> mocks, in filterCandidate() argument 29 if(mocks.size() == 1) { in filterCandidate() 30 final Object matchingMock = mocks.iterator().next(); in filterCandidate()
|
/external/mockito/src/main/java/org/mockito/internal/util/collections/ |
D | HashCodeAndEqualsSafeSet.java | 115 public boolean removeAll(Collection<?> mocks) { in removeAll() argument 116 return backingHashSet.removeAll(asWrappedMocks(mocks)); in removeAll() 119 public boolean containsAll(Collection<?> mocks) { in containsAll() argument 120 return backingHashSet.containsAll(asWrappedMocks(mocks)); in containsAll() 123 public boolean addAll(Collection<?> mocks) { in addAll() argument 124 return backingHashSet.addAll(asWrappedMocks(mocks)); in addAll() 127 public boolean retainAll(Collection<?> mocks) { in retainAll() argument 128 return backingHashSet.retainAll(asWrappedMocks(mocks)); in retainAll() 131 private HashSet<HashCodeAndEqualsMockWrapper> asWrappedMocks(Collection<?> mocks) { in asWrappedMocks() argument 132 Checks.checkNotNull(mocks, "Passed collection should notify() be null"); in asWrappedMocks() [all …]
|
D | Sets.java | 13 public static Set<Object> newMockSafeHashSet(Iterable<Object> mocks) { in newMockSafeHashSet() argument 14 return HashCodeAndEqualsSafeSet.of(mocks); in newMockSafeHashSet() 17 public static Set<Object> newMockSafeHashSet(Object... mocks) { in newMockSafeHashSet() argument 18 return HashCodeAndEqualsSafeSet.of(mocks); in newMockSafeHashSet()
|
/external/mockito/src/main/java/org/mockito/internal/ |
D | MockitoCore.java | 107 public <T> void reset(T... mocks) { in reset() argument 113 for (T m : mocks) { in reset() 118 public <T> void clearInvocations(T... mocks) { in clearInvocations() argument 124 for (T m : mocks) { in clearInvocations() 129 public void verifyNoMoreInteractions(Object... mocks) { in verifyNoMoreInteractions() argument 130 assertMocksNotEmpty(mocks); in verifyNoMoreInteractions() 132 for (Object mock : mocks) { in verifyNoMoreInteractions() 146 public void verifyNoMoreInteractionsInOrder(List<Object> mocks, InOrderContext inOrderContext) { in verifyNoMoreInteractionsInOrder() argument 148 …a = new VerificationDataInOrderImpl(inOrderContext, VerifiableInvocationsFinder.find(mocks), null); in verifyNoMoreInteractionsInOrder() 152 private void assertMocksNotEmpty(Object[] mocks) { in assertMocksNotEmpty() argument [all …]
|
/external/mockito/src/main/java/org/mockito/internal/junit/ |
D | UniversalTestListener.java | 26 …private Map<Object, MockCreationSettings> mocks = new IdentityHashMap<Object, MockCreationSettings… field in UniversalTestListener 40 Collection<Object> createdMocks = mocks.keySet(); in testFinished() 44 mocks = new IdentityHashMap<Object, MockCreationSettings>(); in testFinished() 54 private void reportUnusedStubs(TestFinishedEvent event, Collection<Object> mocks) { in reportUnusedStubs() argument 57 UnusedStubbings unused = new UnusedStubbingsFinder().getUnusedStubbings(mocks); in reportUnusedStubs() 62 …static void emitWarnings(MockitoLogger logger, TestFinishedEvent event, Collection<Object> mocks) { in emitWarnings() argument 66 … new ArgMismatchFinder().getStubbingArgMismatches(mocks).format(event.getTestName(), logger); in emitWarnings() 69 … new UnusedStubbingsFinder().getUnusedStubbings(mocks).format(event.getTestName(), logger); in emitWarnings() 75 this.mocks.put(mock, settings); in onMockCreated()
|
D | MismatchReportingTestListener.java | 20 private List<Object> mocks = new LinkedList<Object>(); field in MismatchReportingTestListener 27 Collection<Object> createdMocks = mocks; in testFinished() 30 mocks = new LinkedList<Object>(); in testFinished() 39 this.mocks.add(mock); in onMockCreated()
|
D | UnusedStubbingsFinder.java | 31 public UnusedStubbings getUnusedStubbings(Iterable<Object> mocks) { in getUnusedStubbings() argument 32 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(mocks); in getUnusedStubbings() 53 public Collection<Invocation> getUnusedStubbingsByLocation(Iterable<Object> mocks) { in getUnusedStubbingsByLocation() argument 54 Set<Stubbing> stubbings = AllInvocationsFinder.findStubbings(mocks); in getUnusedStubbingsByLocation()
|
D | ArgMismatchFinder.java | 16 StubbingArgMismatches getStubbingArgMismatches(Iterable<?> mocks) { in getStubbingArgMismatches() argument 18 for (Invocation i : AllInvocationsFinder.find(mocks)) { in getStubbingArgMismatches() 22 for (Stubbing stubbing : AllInvocationsFinder.findStubbings(mocks)) { in getStubbingArgMismatches()
|
D | UnnecessaryStubbingsReporter.java | 24 private List<Object> mocks = new LinkedList<Object>(); field in UnnecessaryStubbingsReporter 27 … Collection<Invocation> unused = new UnusedStubbingsFinder().getUnusedStubbingsByLocation(mocks); in validateUnusedStubs() 40 mocks.add(mock); in onMockCreated()
|
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/ |
D | MockInjection.java | 56 private final Set<Object> mocks = newMockSafeHashSet(); field in MockInjection.OngoingMockInjection 70 public OngoingMockInjection withMocks(Set<Object> mocks) { in withMocks() argument 71 this.mocks.addAll(checkNotNull(mocks, "mocks")); in withMocks() 92 injectionStrategies.process(field, fieldOwner, mocks); in apply() 93 postInjectionStrategies.process(field, fieldOwner, mocks); in apply()
|
D | PropertyAndSetterInjection.java | 105 …boolean injectMockCandidates(Class<?> awaitingInjectionClazz, Object injectee, Set<Object> mocks) { in injectMockCandidates() argument 109 …injectionOccurred = injectMockCandidatesOnFields(mocks, injectee, false, orderedCandidateInjecteeF… in injectMockCandidates() 111 …injectionOccurred |= injectMockCandidatesOnFields(mocks, injectee, injectionOccurred, orderedCandi… in injectMockCandidates() 115 private boolean injectMockCandidatesOnFields(Set<Object> mocks, in injectMockCandidatesOnFields() argument 121 …Object injected = mockCandidateFilter.filterCandidate(mocks, candidateField, orderedCandidateInjec… in injectMockCandidatesOnFields() 125 mocks.remove(injected); in injectMockCandidatesOnFields()
|
/external/mockito/src/main/java/org/mockito/ |
D | Mockito.java | 2180 public static <T> void reset(T ... mocks) { in reset() argument 2181 MOCKITO_CORE.reset(mocks); in reset() 2195 public static <T> void clearInvocations(T ... mocks) { in clearInvocations() argument 2196 MOCKITO_CORE.clearInvocations(mocks); in clearInvocations() 2243 public static void verifyNoMoreInteractions(Object... mocks) { in verifyNoMoreInteractions() argument 2244 MOCKITO_CORE.verifyNoMoreInteractions(mocks); in verifyNoMoreInteractions() 2253 public static void verifyZeroInteractions(Object... mocks) { in verifyZeroInteractions() argument 2254 MOCKITO_CORE.verifyNoMoreInteractions(mocks); in verifyZeroInteractions() 2568 public static InOrder inOrder(Object... mocks) { in inOrder() argument 2569 return MOCKITO_CORE.inOrder(mocks); in inOrder() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/scanner/ |
D | MockScanner.java | 44 public void addPreparedMocks(Set<Object> mocks) { in addPreparedMocks() argument 45 mocks.addAll(scan()); in addPreparedMocks() 54 Set<Object> mocks = newMockSafeHashSet(); in scan() local 61 mocks.add(mockInstance); in scan() 64 return mocks; in scan()
|
/external/mockito/src/main/java/org/mockito/internal/configuration/ |
D | InjectingAnnotationEngine.java | 78 Set<Object> mocks = newMockSafeHashSet(); in injectMocks() local 82 new MockScanner(testClassInstance, clazz).addPreparedMocks(mocks); in injectMocks() 83 onInjection(testClassInstance, clazz, mockDependentFields, mocks); in injectMocks() 87 … new DefaultInjectionEngine().injectMocksOnFields(mockDependentFields, mocks, testClassInstance); in injectMocks() 90 …tion(Object testClassInstance, Class<?> clazz, Set<Field> mockDependentFields, Set<Object> mocks) { in onInjection() argument
|
/external/mockito/src/main/java/org/mockito/internal/invocation/finder/ |
D | AllInvocationsFinder.java | 26 public static List<Invocation> find(Iterable<?> mocks) { in find() argument 28 for (Object mock : mocks) { in find() 42 public static Set<Stubbing> findStubbings(Iterable<?> mocks) { in findStubbings() argument 44 for (Object mock : mocks) { in findStubbings()
|
/external/easymock/src/org/easymock/ |
D | EasyMock.java | 1545 public static void replay(Object... mocks) { in replay() argument 1546 for (Object mock : mocks) { in replay() 1558 public static void reset(Object... mocks) { in reset() argument 1559 for (Object mock : mocks) { in reset() 1572 public static void resetToNice(Object... mocks) { in resetToNice() argument 1573 for (Object mock : mocks) { in resetToNice() 1586 public static void resetToDefault(Object... mocks) { in resetToDefault() argument 1587 for (Object mock : mocks) { in resetToDefault() 1600 public static void resetToStrict(Object... mocks) { in resetToStrict() argument 1601 for (Object mock : mocks) { in resetToStrict() [all …]
|
/external/mockito/src/main/java/org/mockito/internal/creation/bytebuddy/ |
D | InlineByteBuddyMockMaker.java | 168 …private final WeakConcurrentMap<Object, MockMethodInterceptor> mocks = new WeakConcurrentMap.WithI… field in InlineByteBuddyMockMaker 177 …ator = new TypeCachingBytecodeGenerator(new InlineBytecodeGenerator(INSTRUMENTATION, mocks), true); in InlineByteBuddyMockMaker() 188 mocks.put(instance, mockMethodInterceptor); in createMock() 262 MockMethodInterceptor interceptor = mocks.get(mock); in getHandler() 273 mocks.put(mock, mockMethodInterceptor); in resetMock() 281 mocks.remove(mock); in clearMock() 286 mocks.clear(); in clearAllMocks()
|
/external/mockftpserver/tags/1.0/src/test/java/org/mockftpserver/test/ |
D | AbstractTest.java | 65 private Map mocks = new HashMap(); field in AbstractTest 76 mocks.put(mock, control); in createMock() 94 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) { in replayAll() 113 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) { in verifyAll() 128 MockControl control = (MockControl) mocks.get(mock); in control()
|
/external/dexmaker/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/ |
D | InlineDexmakerMockMaker.java | 168 private final Map<Object, InvocationHandlerAdapter> mocks; field in InlineDexmakerMockMaker 188 mocks = new MockMap(); in InlineDexmakerMockMaker() 189 classTransformer = new ClassTransformer(AGENT, DISPATCHER_CLASS, mocks); in InlineDexmakerMockMaker() 315 mocks.put(mock, handlerAdapter); in createMock() 352 mocks.remove(mock); 357 mocks.clear(); 378 return mocks.get(instance); 570 Set<Object> mocks = new ArraySet<>(adapters.size()); 579 mocks.add(mock); 587 return mocks;
|
/external/mockito/src/test/java/org/mockito/internal/configuration/injection/ |
D | ConstructorInjectionTest.java | 44 HashSet<Object> mocks = new HashSet<Object>(); in newSetOf() local 45 mocks.add(item); in newSetOf() 46 return mocks; in newSetOf()
|
/external/mockito/src/main/java/org/mockito/internal/debugging/ |
D | MockitoDebuggerImpl.java | 24 public String printInvocations(Object ... mocks) { in printInvocations() argument 26 List<Invocation> invocations = AllInvocationsFinder.find(asList(mocks)); in printInvocations() 38 invocations = unusedStubsFinder.find(asList(mocks)); in printInvocations()
|
/external/mockftpserver/tags/2.2/src/test/java/org/mockftpserver/test/ |
D | AbstractTestCase.java | 63 private Map mocks = new HashMap(); field in AbstractTestCase 75 mocks.put(mock, control); in createMock() 94 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) { in replayAll() 115 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) { in verifyAll() 131 MockControl control = (MockControl) mocks.get(mock); in control()
|