HomeSort by relevance Sort by last modified time
    Searched defs:mocks (Results 1 - 25 of 42) sorted by null

1 2

  /external/mockito/src/test/java/org/mockitousage/performance/
LoadsOfMocksTest.java 24 List<IMethods> mocks = new LinkedList<IMethods>(); local
28 mocks.add(mock);
  /external/mockito/src/main/java/org/mockito/internal/junit/
MismatchReportingTestListener.java 20 private List<Object> mocks = new LinkedList<Object>(); field in class:MismatchReportingTestListener
27 Collection<Object> createdMocks = mocks;
28 //At this point, we don't need the mocks any more and we can mark all collected mocks for gc
29 //TODO make it better, it's easy to forget to clean up mocks and we still create new instance of list that nobody will read, it's also duplicated
30 mocks = new LinkedList<Object>();
39 this.mocks.add(mock);
UniversalTestListener.java 26 private Map<Object, MockCreationSettings> mocks = new IdentityHashMap<Object, MockCreationSettings>(); field in class:UniversalTestListener
40 Collection<Object> createdMocks = mocks.keySet();
41 //At this point, we don't need the mocks any more and we can mark all collected mocks for gc
42 //TODO make it better, it's easy to forget to clean up mocks and we still create new instance of list that nobody will read, it's also duplicated
44 mocks = new IdentityHashMap<Object, MockCreationSettings>();
54 private void reportUnusedStubs(TestFinishedEvent event, Collection<Object> mocks) {
57 UnusedStubbings unused = new UnusedStubbingsFinder().getUnusedStubbings(mocks);
62 private static void emitWarnings(MockitoLogger logger, TestFinishedEvent event, Collection<Object> mocks) {
66 new ArgMismatchFinder().getStubbingArgMismatches(mocks).format(event.getTestName(), logger)
    [all...]
UnnecessaryStubbingsReporter.java 24 private List<Object> mocks = new LinkedList<Object>(); field in class:UnnecessaryStubbingsReporter
27 Collection<Invocation> unused = new UnusedStubbingsFinder().getUnusedStubbingsByLocation(mocks);
40 mocks.add(mock);
  /packages/apps/Contacts/tests/src/com/android/contacts/test/mocks/
ContactsMockPackageManager.java 16 package com.android.contacts.test.mocks;
MockAccountTypeManager.java 16 package com.android.contacts.test.mocks;
ForwardingContentProvider.java 16 package com.android.contacts.test.mocks;
MockContactPhotoManager.java 17 package com.android.contacts.test.mocks;
ContactsMockContext.java 17 package com.android.contacts.test.mocks;
MockSharedPreferences.java 17 package com.android.contacts.test.mocks;
  /external/mockito/src/test/java/org/mockito/internal/configuration/injection/
ConstructorInjectionTest.java 44 HashSet<Object> mocks = new HashSet<Object>(); local
45 mocks.add(item);
46 return mocks;
  /external/mockito/src/main/java/org/mockito/internal/configuration/injection/scanner/
MockScanner.java 18 * Scan mocks, and prepare them if needed.
39 * The preparation of mocks consists only in defining a MockName if not already set.
42 * @param mocks Set of mocks
44 public void addPreparedMocks(Set<Object> mocks) {
45 mocks.addAll(scan());
49 * Scan and prepare mocks for the given <code>testClassInstance</code> and <code>clazz</code> in the type hierarchy.
54 Set<Object> mocks = newMockSafeHashSet(); local
61 mocks.add(mockInstance);
64 return mocks;
    [all...]
  /external/mockito/src/main/java/org/mockito/internal/configuration/
InjectingAnnotationEngine.java 25 * Process the fields of the test instance and create Mocks, Spies, Captors and inject them on fields
31 * <li>First create Mocks, Spies, Captors.</li>
56 //this will create @Mocks, @Captors, etc:
78 Set<Object> mocks = newMockSafeHashSet(); local
82 new MockScanner(testClassInstance, clazz).addPreparedMocks(mocks);
83 onInjection(testClassInstance, clazz, mockDependentFields, mocks);
87 new DefaultInjectionEngine().injectMocksOnFields(mockDependentFields, mocks, testClassInstance);
90 protected void onInjection(Object testClassInstance, Class<?> clazz, Set<Field> mockDependentFields, Set<Object> mocks) {
  /frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/mocks/
PhoneSwitcherMock.java 17 package com.android.internal.telephony.mocks;
SubscriptionMonitorMock.java 17 package com.android.internal.telephony.mocks;
DcTrackerMock.java 17 package com.android.internal.telephony.mocks;
SubscriptionControllerMock.java 17 package com.android.internal.telephony.mocks;
TelephonyRegistryMock.java 17 package com.android.internal.telephony.mocks;
  /external/dexmaker/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/
InlineDexmakerMockMaker.java 156 * All currently active mocks. We modify the class's byte code. Some objects of the class are
160 private final Map<Object, InvocationHandlerAdapter> mocks; field in class:InlineDexmakerMockMaker
179 mocks = new MockMap();
180 classTransformer = new ClassTransformer(AGENT, DISPATCHER_CLASS, mocks);
295 mocks.put(mock, handlerAdapter);
348 return mocks.get(instance);
352 * A map mock -> adapter that holds weak references to the mocks and cleans them up when a
380 * We need to do periodic cleanups as we might never look at mocks at higher indexes and
537 Set<Object> mocks = new ArraySet<>(adapters.size());
546 mocks.add(mock)
    [all...]
  /external/mockftpserver/MockFtpServer/src/test/java/org/mockftpserver/test/
AbstractTestCase.java 64 private Map mocks = new HashMap(); field in class:AbstractTestCase
76 mocks.put(mock, control);
92 * Put all mocks created with createMock() into replay mode.
95 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) {
113 * Verify all mocks created with createMock() into replay mode.
116 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) {
132 MockControl control = (MockControl) mocks.get(mock);
  /external/mockftpserver/branches/1.x_Branch/src/test/java/org/mockftpserver/test/
AbstractTest.java 65 private Map mocks = new HashMap(); field in class:AbstractTest
76 mocks.put(mock, control);
91 * Put all mocks created with createMock() into replay mode.
94 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) {
110 * Verify all mocks created with createMock() into replay mode.
113 for (Iterator iter = mocks.keySet().iterator(); iter.hasNext();) {
128 MockControl control = (MockControl) mocks.get(mock);
  /external/mockito/src/main/java/org/mockito/internal/creation/bytebuddy/
InlineByteBuddyMockMaker.java 69 * Important behavioral changes when using inline-mocks:
72 * the mocked type. Mockito voluntarily never mocks package-visible methods within <code>java.*</code> packages.</li>
75 * <li>Mockito can no longer mock <code>native</code> methods. Inline mocks require byte code manipulation of a
81 * Note that inline mocks require a Java agent to be attached. Mockito will attempt an attachment of a Java agent upon
82 * loading the mock maker for creating inline mocks. Such runtime attachment is only possible when using a JVM that
104 "Byte Buddy requires retransformation for creating inline mocks. This feature is unavailable on the current VM.",
167 private final WeakConcurrentMap<Object, MockMethodInterceptor> mocks = new WeakConcurrentMap.WithInlinedExpunction<Object, MockMethodInterceptor>(); field in class:InlineByteBuddyMockMaker
176 bytecodeGenerator = new TypeCachingBytecodeGenerator(new InlineBytecodeGenerator(INSTRUMENTATION, mocks), true);
187 mocks.put(instance, mockMethodInterceptor);
225 "You are seeing this disclaimer because Mockito is configured to create inlined mocks."
    [all...]
  /external/mockito/src/main/java/org/mockito/internal/configuration/injection/
MockInjection.java 21 * Allow the user of this class to configure the way the injection of mocks will happen.
56 private final Set<Object> mocks = newMockSafeHashSet(); field in class:MockInjection.OngoingMockInjection
70 public OngoingMockInjection withMocks(Set<Object> mocks) {
71 this.mocks.addAll(checkNotNull(mocks, "mocks"));
92 injectionStrategies.process(field, fieldOwner, mocks);
93 postInjectionStrategies.process(field, fieldOwner, mocks);
  /external/mockito/src/test/java/org/mockito/internal/util/collections/
HashCodeAndEqualsSafeSetTest.java 41 HashCodeAndEqualsSafeSet mocks = new HashCodeAndEqualsSafeSet(); local
42 mocks.add(mock1);
44 assertThat(mocks.contains(mock1)).isTrue();
47 assertThat(mocks.contains(mock2)).isFalse();
52 HashCodeAndEqualsSafeSet mocks = new HashCodeAndEqualsSafeSet(); local
54 mocks.add(mock);
55 mocks.remove(mock);
57 assertThat(mocks.isEmpty()).isTrue();
63 HashCodeAndEqualsSafeSet mocks = HashCodeAndEqualsSafeSet.of( local
69 workingSet.addAll(mocks);
76 HashCodeAndEqualsSafeSet mocks = HashCodeAndEqualsSafeSet.of( local
91 HashCodeAndEqualsSafeSet mocks = HashCodeAndEqualsSafeSet.of( local
106 HashCodeAndEqualsSafeSet mocks = HashCodeAndEqualsSafeSet.of( local
119 HashCodeAndEqualsSafeSet mocks = HashCodeAndEqualsSafeSet.of(mock1); local
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
BatteryEntryTest.java 57 @Rule public MockitoRule mocks = MockitoJUnit.rule(); field in class:BatteryEntryTest

Completed in 699 milliseconds

1 2