Class DefaultConstructorExpectationSetup<T>
java.lang.Object
org.powermock.api.mockito.expectation.DefaultConstructorExpectationSetup<T>
- All Implemented Interfaces:
ConstructorExpectationSetup<T>
,WithAnyArguments<T>
,WithExpectedArguments<T>
,WithExpectedParameterTypes<T>
,WithOrWithoutExpectedArguments<T>
,WithoutExpectedArguments<T>
public class DefaultConstructorExpectationSetup<T>
extends Object
implements ConstructorExpectationSetup<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArrayMerger
private final InvocationSubstitute
private final DefaultMockCreator
private Class<?>[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate NewInvocationControl
<org.mockito.stubbing.OngoingStubbing<T>> createNewInvocationControl
(Class<T> type, Class<T> unmockedType) private NewInvocationControl
<org.mockito.stubbing.OngoingStubbing<T>> private org.mockito.stubbing.OngoingStubbing
<T> createNewSubstituteMock
(Class<T> type, Class<?>[] parameterTypes, Object... arguments) private Object
createParamArgMatcher
(Class<?> paramType) private DefaultMockCreator
(package private) void
setParameterTypes
(Class<?>[] parameterTypes) org.mockito.stubbing.OngoingStubbing
<T> org.mockito.stubbing.OngoingStubbing
<T> withArguments
(Object firstArgument, Object... additionalArguments) org.mockito.stubbing.OngoingStubbing
<T> withParameterTypes
(Class<?> parameterType, Class<?>... additionalParameterTypes)
-
Field Details
-
mockType
-
arrayMerger
-
mockCreator
-
parameterTypes
-
mock
-
-
Constructor Details
-
DefaultConstructorExpectationSetup
-
-
Method Details
-
withArguments
public org.mockito.stubbing.OngoingStubbing<T> withArguments(Object firstArgument, Object... additionalArguments) throws Exception - Specified by:
withArguments
in interfaceWithExpectedArguments<T>
- Throws:
Exception
-
createNewSubstituteMock
private org.mockito.stubbing.OngoingStubbing<T> createNewSubstituteMock(Class<T> type, Class<?>[] parameterTypes, Object... arguments) throws Exception - Throws:
Exception
-
createNewInvocationControl
-
withAnyArguments
- Specified by:
withAnyArguments
in interfaceWithAnyArguments<T>
- Throws:
Exception
-
createParamArgMatcher
-
withNoArguments
- Specified by:
withNoArguments
in interfaceWithoutExpectedArguments<T>
- Throws:
Exception
-
withParameterTypes
public WithExpectedArguments<T> withParameterTypes(Class<?> parameterType, Class<?>... additionalParameterTypes) - Specified by:
withParameterTypes
in interfaceWithExpectedParameterTypes<T>
-
getMockCreator
-
createNewInvocationControl
private NewInvocationControl<org.mockito.stubbing.OngoingStubbing<T>> createNewInvocationControl(InvocationSubstitute<T> mock) -
setParameterTypes
-