Home
last modified time | relevance | path

Searched refs:extraInterfaces (Results 1 – 22 of 22) 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.java57 .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.java41 @Mock(extraInterfaces={List.class},serializable=true) IMethods imethodsWithExtraInterfacesMock;
/external/mockito/src/main/java/org/mockito/internal/creation/settings/
DCreationSettings.java26 protected Set<Class<?>> extraInterfaces = new LinkedHashSet<Class<?>>(); field in CreationSettings
47 this.extraInterfaces = copy.extraInterfaces; in CreationSettings()
74 return extraInterfaces; in getExtraInterfaces()
77 public CreationSettings<T> setExtraInterfaces(Set<Class<?>> extraInterfaces) { in setExtraInterfaces() argument
78 this.extraInterfaces = extraInterfaces; in setExtraInterfaces()
/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/mockito/src/main/java/org/mockito/internal/creation/
DMockSettingsImpl.java55 public MockSettings extraInterfaces(Class<?>... extraInterfaces) { in extraInterfaces() argument
56 if (extraInterfaces == null || extraInterfaces.length == 0) { in extraInterfaces()
60 for (Class<?> i : extraInterfaces) { in extraInterfaces()
67 this.extraInterfaces = newSet(extraInterfaces); in extraInterfaces()
78 return extraInterfaces; in getExtraInterfaces()
/external/mockito/src/test/java/org/mockitousage/stacktrace/
DModellingDescriptiveMessagesTest.java175 mock(IMethods.class, withSettings().extraInterfaces(List.class, null)); in shouldScreamWhenNullPassedInsteadOfAnInterface()
181 mock(IMethods.class, withSettings().extraInterfaces(LinkedList.class)); in shouldScreamWhenNonInterfacePassed()
187 mock(IMethods.class, withSettings().extraInterfaces(IMethods.class)); in shouldScreamWhenExtraIsTheSame()
193 mock(IMethods.class, withSettings().extraInterfaces()); in shouldScreamWhenExtraInterfacesEmpty()
199 mock(IMethods.class, withSettings().extraInterfaces((Class<?>[]) null)); in shouldScreamWhenExtraInterfacesIsANullArray()
/external/mockito/src/main/java/org/mockito/internal/configuration/
DMockAnnotationProcessor.java24 if (annotation.extraInterfaces().length > 0) { // never null in processAnnotationForMock()
25 mockSettings.extraInterfaces(annotation.extraInterfaces()); in processAnnotationForMock()
/external/dexmaker/dexmaker-mockito/src/main/java/com/android/dx/mockito/
DDexmakerMockMaker.java86 Class<?>[] extraInterfaces = interfacesSet.toArray(new Class[interfacesSet.size()]); in createMock() local
91 Class[] classesToMock = new Class[extraInterfaces.length + 1]; in createMock()
93 System.arraycopy(extraInterfaces, 0, classesToMock, 1, extraInterfaces.length); in createMock()
103 .implementing(extraInterfaces); in createMock()
/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/listeners/
DVerificationStartedNotifierTest.java82 final Set mock = mock(Set.class, withSettings().extraInterfaces(List.class)); in decent_exception_when_setting_mock_that_does_not_implement_all_desired_interfaces()
102 final Set mock = mock(Set.class, withSettings().extraInterfaces(List.class, Map.class)); in accepts_replacement_mock_if_all_types_are_compatible()
103 … final Set compatibleMock = mock(Set.class, withSettings().extraInterfaces(List.class, Map.class)); in accepts_replacement_mock_if_all_types_are_compatible()
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/
DAbstractByteBuddyMockMakerTest.java157 …rivate static <T> MockCreationSettings<T> settingsFor(Class<T> type, Class<?>... extraInterfaces) { in settingsFor() argument
160 if(extraInterfaces.length > 0) mockSettings.extraInterfaces(extraInterfaces); in settingsFor()
DInlineByteBuddyMockMakerTest.java325 …rivate static <T> MockCreationSettings<T> settingsFor(Class<T> type, Class<?>... extraInterfaces) { in settingsFor() argument
329 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/dexmaker/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/
DInlineDexmakerMockMaker.java249 Class<?>[] extraInterfaces = interfacesSet.toArray(new Class[interfacesSet.size()]); in createMock() local
255 Class[] classesToMock = new Class[extraInterfaces.length + 1]; in createMock()
257 System.arraycopy(extraInterfaces, 0, classesToMock, 1, extraInterfaces.length); in createMock()
278 (extraInterfaces) in createMock()
/external/mockito/src/main/java/org/mockito/
DMock.java76 Class<?>[] extraInterfaces() default {}; in extraInterfaces() method
DMockSettings.java67 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.java79 @Mock(extraInterfaces = {List.class}) IMethods hasExtraInterfaces;
/external/mockito/src/main/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsDeepStubs.java104 withSettings().extraInterfaces(returnTypeGenericMetadata.rawExtraInterfaces()) in withSettingsUsing()