Home
last modified time | relevance | path

Searched refs:extraInterfaces (Results 1 – 21 of 21) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/basicapi/
DMockingMultipleInterfacesTest.java29 Foo mock = mock(Foo.class, withSettings().extraInterfaces(IFoo.class, IBar.class)); in should_allow_multiple_interfaces()
40 mock(Foo.class, withSettings().extraInterfaces(IFoo.class, null)); in should_scream_when_null_passed_instead_of_an_interface()
52 mock(Foo.class, withSettings().extraInterfaces()); in should_scream_when_no_args_passed()
64 mock(Foo.class, withSettings().extraInterfaces((Class[]) null)); in should_scream_when_null_passed_instead_of_an_array()
76 mock(Foo.class, withSettings().extraInterfaces(Foo.class)); in should_scream_when_non_interface_passed()
88 mock(IMethods.class, withSettings().extraInterfaces(IMethods.class)); in should_scream_when_the_same_interfaces_passed()
109 Object mocked = mock(interface1, withSettings().extraInterfaces(interface2)); in should_mock_class_with_interfaces_of_different_class_loader_AND_different_classpaths()
DMocksCreationTest.java61 .extraInterfaces(List.class) in shouldCombineMockNameAndExtraInterfaces()
DMocksSerializationTest.java337 … IMethods mock = mock(IMethods.class, withSettings().serializable().extraInterfaces(List.class)); in should_be_serialize_and_have_extra_interfaces()
338 …IMethods mockTwo = mock(IMethods.class, withSettings().extraInterfaces(List.class).serializable()); in should_be_serialize_and_have_extra_interfaces()
DMocksSerializationForAnnotationTest.java42 @Mock(extraInterfaces={List.class},serializable=true) IMethods imethodsWithExtraInterfacesMock;
/external/mockito/src/main/java/org/mockito/internal/creation/settings/
DCreationSettings.java24 protected Set<Class<?>> extraInterfaces = new LinkedHashSet<Class<?>>(); field in CreationSettings
41 this.extraInterfaces = copy.extraInterfaces; in CreationSettings()
63 return extraInterfaces; in getExtraInterfaces()
66 public CreationSettings<T> setExtraInterfaces(Set<Class<?>> extraInterfaces) { in setExtraInterfaces() argument
67 this.extraInterfaces = extraInterfaces; in setExtraInterfaces()
/external/mockito/src/main/java/org/mockito/internal/creation/
DMockSettingsImpl.java43 public MockSettings extraInterfaces(Class<?>... extraInterfaces) { in extraInterfaces() method in MockSettingsImpl
44 if (extraInterfaces == null || extraInterfaces.length == 0) { in extraInterfaces()
48 for (Class<?> i : extraInterfaces) { in extraInterfaces()
55 this.extraInterfaces = newSet(extraInterfaces); in extraInterfaces()
64 return extraInterfaces; in getExtraInterfaces()
/external/mockito/src/main/java/org/mockito/internal/creation/bytebuddy/
DByteBuddyCrossClassLoaderSerializationSupport.java162 private final Set<Class<?>> extraInterfaces; field in ByteBuddyCrossClassLoaderSerializationSupport.CrossClassLoaderSerializationProxy
185 this.extraInterfaces = mockSettings.getExtraInterfaces(); in CrossClassLoaderSerializationProxy()
199 …InputStream objectInputStream = new MockitoMockObjectInputStream(bis, typeToMock, extraInterfaces); in readResolve()
242 private final Set<Class<?>> extraInterfaces; field in ByteBuddyCrossClassLoaderSerializationSupport.MockitoMockObjectInputStream
244 …ObjectInputStream(InputStream in, Class<?> typeToMock, Set<Class<?>> extraInterfaces) throws IOExc… in MockitoMockObjectInputStream() argument
247 this.extraInterfaces = extraInterfaces; in MockitoMockObjectInputStream()
275 .setExtraInterfaces(extraInterfaces) in resolveClass()
/external/mockito/src/test/java/org/mockito/internal/creation/
DMockSettingsImplTest.java31 mockSettingsImpl.extraInterfaces(List.class, null); in shouldNotAllowSettingNullInterface()
37 mockSettingsImpl.extraInterfaces(List.class, LinkedList.class); in shouldNotAllowNonInterfaces()
43 mockSettingsImpl.extraInterfaces(List.class, LinkedList.class); in shouldNotAllowUsingTheSameInterfaceAsExtra()
49 mockSettingsImpl.extraInterfaces(); in shouldNotAllowEmptyExtraInterfaces()
55 mockSettingsImpl.extraInterfaces((Class<?>[]) null); in shouldNotAllowNullArrayOfExtraInterfaces()
62 mockSettingsImpl.extraInterfaces(List.class, Set.class); in shouldAllowMultipleInterfaces()
/external/dexmaker/dexmaker-mockito/src/main/java/com/android/dx/mockito/
DDexmakerMockMaker.java42 Class<?>[] extraInterfaces = interfacesSet.toArray(new Class[interfacesSet.size()]); in createMock() local
47 Class[] classesToMock = new Class[extraInterfaces.length + 1]; in createMock()
49 System.arraycopy(extraInterfaces, 0, classesToMock, 1, extraInterfaces.length); in createMock()
59 .implementing(extraInterfaces) in createMock()
/external/mockito/src/main/java/org/mockito/internal/configuration/
DMockAnnotationProcessor.java19 if (annotation.extraInterfaces().length > 0) { // never null in process()
20 mockSettings.extraInterfaces(annotation.extraInterfaces()); in process()
/external/mockito/src/test/java/org/mockitousage/stacktrace/
DModellingDescriptiveMessagesTest.java172 mock(IMethods.class, withSettings().extraInterfaces(List.class, null)); in shouldScreamWhenNullPassedInsteadOfAnInterface()
177 mock(IMethods.class, withSettings().extraInterfaces(LinkedList.class)); in shouldScreamWhenNonInterfacePassed()
182 mock(IMethods.class, withSettings().extraInterfaces(IMethods.class)); in shouldScreamWhenExtraIsTheSame()
187 mock(IMethods.class, withSettings().extraInterfaces()); in shouldScreamWhenExtraInterfacesEmpty()
192 mock(IMethods.class, withSettings().extraInterfaces((Class<?>[]) null)); in shouldScreamWhenExtraInterfacesIsANullArray()
/external/dexmaker/
Dbug-8108255.patch5 Class[] classesToMock = new Class[extraInterfaces.length + 1];
7 System.arraycopy(extraInterfaces, 0, classesToMock, 1, extraInterfaces.length);
/external/mockito/src/main/java/org/mockito/internal/util/
DMockCreationValidator.java28 … public void validateExtraInterfaces(Class<?> classToMock, Collection<Class<?>> extraInterfaces) { in validateExtraInterfaces() argument
29 if (extraInterfaces == null) { in validateExtraInterfaces()
33 for (Class<?> i : extraInterfaces) { in validateExtraInterfaces()
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/
DAbstractByteBuddyMockMakerTest.java154 …rivate static <T> MockCreationSettings<T> settingsFor(Class<T> type, Class<?>... extraInterfaces) { in settingsFor() argument
157 if(extraInterfaces.length > 0) mockSettings.extraInterfaces(extraInterfaces); in settingsFor()
DInlineByteBuddyMockMakerTest.java259 …rivate static <T> MockCreationSettings<T> settingsFor(Class<T> type, Class<?>... extraInterfaces) { in settingsFor() argument
263 if (extraInterfaces.length > 0) mockSettings.extraInterfaces(extraInterfaces); in settingsFor()
/external/mockito/src/main/java/org/mockito/internal/util/reflection/
DGenericMetadataSupport.java181 public List<Type> extraInterfaces() { in extraInterfaces() method in GenericMetadataSupport
415 public List<Type> extraInterfaces() { in extraInterfaces() method in GenericMetadataSupport.TypeVariableReturnType
434 List<Type> extraInterfaces = extraInterfaces(); in rawExtraInterfaces() local
436 for (Type extraInterface : extraInterfaces) { in rawExtraInterfaces()
/external/mockito/src/main/java/org/mockito/
DMock.java73 Class<?>[] extraInterfaces() default {}; in extraInterfaces() method
DMockSettings.java60 MockSettings extraInterfaces(Class<?>... interfaces); in extraInterfaces() method
/external/mockito/src/test/java/org/mockito/internal/util/reflection/
DGenericMetadataSupportTest.java121 … GenericMetadataSupport extraInterface_0 = inferFrom(genericMetadata.extraInterfaces().get(0)); in bounded_typeVariable_return_type_of____returningK____resolved_to_Comparable_and_with_BoundedType()
157 … GenericMetadataSupport extraInterface_0 = inferFrom(genericMetadata.extraInterfaces().get(0)); in typeVariable_with_type_parameters_return_type_of____typeVar_with_type_params____resolved_K_hence_to_Comparable_and_with_BoundedType()
/external/mockito/src/test/java/org/mockitousage/annotation/
DAnnotationsTest.java78 @Mock(extraInterfaces = {List.class}) IMethods hasExtraInterfaces;
/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsDeepStubs.java104 withSettings().extraInterfaces(returnTypeGenericMetadata.rawExtraInterfaces()) in withSettingsUsing()