Searched refs:mocks (Results 1 - 25 of 25) sorted by relevance

/external/mockito/src/org/mockito/
H A DMockitoDebugger.java11 String printInvocations(Object ... mocks); argument
H A DMockito.java22 * Mockito library enables mocks creation, verification and stubbing.
39 * <a href="#9">9. Shorthand for mocks creation - <code>&#064;Mock</code> annotation </a><br/>
46 * <a href="#16">16. Real partial mocks (Since 1.8.0) </a><br/>
47 * <a href="#17">17. Resetting mocks (Since 1.8.0) </a><br/>
50 * <a href="#20">20. Serializable mocks (Since 1.8.1) </a><br/>
271 * // B. Multiple mocks that must be used in a particular order
275 * //using mocks
279 * //create inOrder object passing any mocks that need to be verified in order
293 * Also, you can create InOrder object passing only mocks that are relevant for
302 * //using mocks
1530 reset(T .... mocks) argument
1575 verifyNoMoreInteractions(Object... mocks) argument
1594 verifyZeroInteractions(Object... mocks) argument
1854 inOrder(Object... mocks) argument
1921 ignoreStubs(Object... mocks) argument
[all...]
/external/mockito/src/org/mockito/internal/util/collections/
H A DSets.java15 public static Set<Object> newMockSafeHashSet(Iterable<Object> mocks) { argument
16 return HashCodeAndEqualsSafeSet.of(mocks);
19 public static Set<Object> newMockSafeHashSet(Object... mocks) { argument
20 return HashCodeAndEqualsSafeSet.of(mocks);
H A DHashCodeAndEqualsSafeSet.java21 * Useful for holding mocks that have un-stubbable hashCode or equals method,
115 public boolean removeAll(Collection<?> mocks) { argument
116 return backingHashSet.removeAll(asWrappedMocks(mocks));
119 public boolean containsAll(Collection<?> mocks) { argument
120 return backingHashSet.containsAll(asWrappedMocks(mocks));
123 public boolean addAll(Collection<?> mocks) { argument
124 return backingHashSet.addAll(asWrappedMocks(mocks));
127 public boolean retainAll(Collection<?> mocks) { argument
128 return backingHashSet.retainAll(asWrappedMocks(mocks));
131 private HashSet<HashCodeAndEqualsMockWrapper> asWrappedMocks(Collection<?> mocks) { argument
145 of(Object... mocks) argument
[all...]
/external/mockito/src/org/mockito/internal/configuration/injection/filter/
H A DNameBasedCandidateFilter.java22 public OngoingInjecter filterCandidate(Collection<Object> mocks, Field field, Object fieldInstance) { argument
24 if(mocks.size() > 1) {
25 for (Object mock : mocks) {
32 return next.filterCandidate(mocks, field, fieldInstance);
H A DFinalMockCandidateFilter.java23 public OngoingInjecter filterCandidate(final Collection<Object> mocks, final Field field, final Object fieldInstance) { argument
24 if(mocks.size() == 1) {
25 final Object matchingMock = mocks.iterator().next();
H A DMockCandidateFilter.java13 Collection<Object> mocks,
12 filterCandidate( Collection<Object> mocks, Field fieldToBeInjected, Object fieldInstance ) argument
H A DTypeBasedCandidateFilter.java20 public OngoingInjecter filterCandidate(Collection<Object> mocks, Field field, Object fieldInstance) { argument
22 for (Object mock : mocks) {
/external/mockito/src/org/mockito/internal/configuration/
H A DDefaultInjectionEngine.java19 public void injectMocksOnFields(Set<Field> needingInjection, Set<Object> mocks, Object testClassInstance) { argument
21 .withMocks(mocks)
H A DInjectingAnnotationEngine.java92 Set<Object> mocks = newMockSafeHashSet();
96 new MockScanner(testClassInstance, clazz).addPreparedMocks(mocks);
100 new DefaultInjectionEngine().injectMocksOnFields(mockDependentFields, mocks, testClassInstance);
/external/mockito/src/org/mockito/internal/configuration/injection/
H A DMockInjection.java21 * Allow the user of this class to configure the way the injection of mocks will happen.
56 private Set<Object> mocks = newMockSafeHashSet(); field in class:MockInjection.OngoingMockInjection
70 public OngoingMockInjection withMocks(Set<Object> mocks) { argument
71 this.mocks.addAll(checkNotNull(mocks, "mocks"));
92 injectionStrategies.process(field, fieldOwner, mocks);
93 postInjectionStrategies.process(field, fieldOwner, mocks);
H A DPropertyAndSetterInjection.java26 * Inject mocks using first setters then fields, if no setters available.
46 * <li>remove mock from mocks copy (mocks are just injected once in a class)
101 private boolean injectMockCandidates(Class<?> awaitingInjectionClazz, Set<Object> mocks, Object instance) { argument
105 injectionOccurred |= injectMockCandidatesOnFields(mocks, instance, injectionOccurred, orderedInstanceFields);
107 injectionOccurred |= injectMockCandidatesOnFields(mocks, instance, injectionOccurred, orderedInstanceFields);
111 private boolean injectMockCandidatesOnFields(Set<Object> mocks, Object instance, boolean injectionOccurred, List<Field> orderedInstanceFields) { argument
114 Object injected = mockCandidateFilter.filterCandidate(mocks, field, instance).thenInject();
117 mocks.remove(injected);
/external/mockito/src/org/mockito/internal/
H A DMockitoCore.java89 public <T> void reset(T ... mocks) { argument
94 for (T m : mocks) {
99 public void verifyNoMoreInteractions(Object... mocks) { argument
100 assertMocksNotEmpty(mocks);
102 for (Object mock : mocks) {
116 public void verifyNoMoreInteractionsInOrder(List<Object> mocks, InOrderContext inOrderContext) { argument
119 VerificationDataInOrder data = new VerificationDataInOrderImpl(inOrderContext, finder.find(mocks), null);
123 private void assertMocksNotEmpty(Object[] mocks) { argument
124 if (mocks == null || mocks
129 inOrder(Object... mocks) argument
169 ignoreStubs(Object... mocks) argument
[all...]
/external/mockito/src/org/mockito/internal/invocation/finder/
H A DVerifiableInvocationsFinder.java18 public List<Invocation> find(List<?> mocks) { argument
19 List<Invocation> invocations = new AllInvocationsFinder().find(mocks);
H A DAllInvocationsFinder.java17 * gets all invocations from mocks. Invocations are ordered earlier first.
19 * @param mocks mocks
22 public List<Invocation> find(List<?> mocks) { argument
24 for (Object mock : mocks) {
/external/mockito/src/org/mockito/internal/configuration/injection/scanner/
H A DMockScanner.java19 * Scan mocks, and prepare them if needed.
41 * The preparation of mocks consists only in defining a MockName if not already set.
44 * @param mocks Set of mocks
46 public void addPreparedMocks(Set<Object> mocks) { argument
47 mocks.addAll(scan());
51 * Scan and prepare mocks for the given <code>testClassInstance</code> and <code>clazz</code> in the type hierarchy.
56 Set<Object> mocks = newMockSafeHashSet();
63 mocks.add(mockInstance);
66 return mocks;
[all...]
/external/mockito/src/org/mockito/internal/invocation/
H A DUnusedStubsFinder.java18 * Finds all unused stubs for given mocks
20 * @param mocks
22 public List<Invocation> find(List<?> mocks) { argument
24 for (Object mock : mocks) {
/external/mockito/src/org/mockito/internal/debugging/
H A DMockitoDebuggerImpl.java21 public String printInvocations(Object ... mocks) { argument
23 List<Invocation> invocations = allInvocationsFinder.find(asList(mocks));
35 invocations = unusedStubsFinder.find(asList(mocks));
/external/easymock/src/org/easymock/
H A DEasyMock.java1542 * @param mocks
1545 public static void replay(Object... mocks) { argument
1546 for (Object mock : mocks) {
1555 * @param mocks
1558 public static void reset(Object... mocks) { argument
1559 for (Object mock : mocks) {
1569 * @param mocks
1572 public static void resetToNice(Object... mocks) { argument
1573 for (Object mock : mocks) {
1583 * @param mocks
1586 resetToDefault(Object... mocks) argument
1600 resetToStrict(Object... mocks) argument
1613 verify(Object... mocks) argument
[all...]
/external/android-mock/src/com/google/android/testing/mocking/
H A DAndroidFrameworkMockGenerator.java37 * This class will pull pre-defined mocks for Android framework classes. This is
66 throw new ClassNotFoundException("Missing class while fetching prebuilt mocks: "
87 * @return a List of {@link GeneratedClassFile} objects representing the mocks for the specified
93 List<GeneratedClassFile> mocks = new ArrayList<GeneratedClassFile>();
94 mocks.addAll(mockGenerator.createMocksForClass(clazz, version));
95 return mocks;
167 throw new RuntimeException("Internal error generating framework mocks", e);
H A DAndroidMock.java2457 * @param mocks the mock objects.
2459 public static void replay(Object... mocks) { argument
2460 for (Object mockObject : mocks) {
2473 * @param mocks the mock objects.
2475 public static void reset(Object... mocks) { argument
2476 for (Object mockObject : mocks) {
2487 * objects) and change them in to mocks with nice behavior.
2490 * @param mocks the mock objects
2492 public static void resetToNice(Object... mocks) { argument
2493 for (Object mockObject : mocks) {
2509 resetToDefault(Object... mocks) argument
2526 resetToStrict(Object... mocks) argument
2546 verify(Object... mocks) argument
[all...]
/external/android-mock/tests/com/google/android/testing/mocking/
H A DAndroidFrameworkMockGeneratorTest.java145 List<GeneratedClassFile> mocks = mockGenerator.getMocksForClass(Vector.class);
160 assertEquals(expectedClassNames.length, mocks.size());
161 for (int i = 0; i < mocks.size(); ++i) {
162 assertEquals(expectedClassNames[i], mocks.get(i).getClassName());
/external/littlemock/src/com/google/testing/littlemock/
H A DLittleMock.java57 * <p>Then stubbing out mocks works as follows:
80 * <li>No need to remember to put your mocks in replay mode.</li>
205 /** Assert that no method calls at all happened on these mocks. */
206 public static void verifyZeroInteractions(Object... mocks) { argument
208 for (Object mock : mocks) {
214 /** Assert that there are no unverified method calls on these mocks. */
215 public static void verifyNoMoreInteractions(Object... mocks) { argument
217 for (Object mock : mocks) {
337 /** Recurse up the class hierarchy injecting mocks as we go, stopping when we reach Object. */
468 /** Clears out the expectations on these mocks
469 reset(Object... mocks) argument
1348 inOrder(Object... mocks) argument
[all...]
/external/dexmaker/lib/
H A Dmockito-core-1.9.1-SNAPSHOT.jarMETA-INF/ META-INF/MANIFEST.MF org/ org/mockito/ org/mockito/asm/ org/mockito/asm/signature/ ...
/external/robolectric/lib/test/
H A Dmockito-core-1.8.5.jarMETA-INF/ META-INF/MANIFEST.MF org/ org/mockito/ org/mockito/asm/ org/mockito/asm/signature/ ...

Completed in 421 milliseconds