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 java.lang.Object implements ConstructorExpectationSetup<T>
-
-
Field Summary
Fields Modifier and Type Field Description private ArrayMerger
arrayMerger
private InvocationSubstitute
mock
private DefaultMockCreator
mockCreator
private java.lang.Class<T>
mockType
private java.lang.Class<?>[]
parameterTypes
-
Constructor Summary
Constructors Constructor Description DefaultConstructorExpectationSetup(java.lang.Class<T> mockType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private NewInvocationControl<org.mockito.stubbing.OngoingStubbing<T>>
createNewInvocationControl(java.lang.Class<T> type, java.lang.Class<T> unmockedType)
private NewInvocationControl<org.mockito.stubbing.OngoingStubbing<T>>
createNewInvocationControl(InvocationSubstitute<T> mock)
private org.mockito.stubbing.OngoingStubbing<T>
createNewSubstituteMock(java.lang.Class<T> type, java.lang.Class<?>[] parameterTypes, java.lang.Object... arguments)
private java.lang.Object
createParamArgMatcher(java.lang.Class<?> paramType)
private DefaultMockCreator
getMockCreator()
(package private) void
setParameterTypes(java.lang.Class<?>[] parameterTypes)
org.mockito.stubbing.OngoingStubbing<T>
withAnyArguments()
org.mockito.stubbing.OngoingStubbing<T>
withArguments(java.lang.Object firstArgument, java.lang.Object... additionalArguments)
org.mockito.stubbing.OngoingStubbing<T>
withNoArguments()
WithExpectedArguments<T>
withParameterTypes(java.lang.Class<?> parameterType, java.lang.Class<?>... additionalParameterTypes)
-
-
-
Field Detail
-
mockType
private final java.lang.Class<T> mockType
-
arrayMerger
private final ArrayMerger arrayMerger
-
mockCreator
private final DefaultMockCreator mockCreator
-
parameterTypes
private java.lang.Class<?>[] parameterTypes
-
mock
private final InvocationSubstitute mock
-
-
Constructor Detail
-
DefaultConstructorExpectationSetup
public DefaultConstructorExpectationSetup(java.lang.Class<T> mockType)
-
-
Method Detail
-
withArguments
public org.mockito.stubbing.OngoingStubbing<T> withArguments(java.lang.Object firstArgument, java.lang.Object... additionalArguments) throws java.lang.Exception
- Specified by:
withArguments
in interfaceWithExpectedArguments<T>
- Throws:
java.lang.Exception
-
createNewSubstituteMock
private org.mockito.stubbing.OngoingStubbing<T> createNewSubstituteMock(java.lang.Class<T> type, java.lang.Class<?>[] parameterTypes, java.lang.Object... arguments) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createNewInvocationControl
private NewInvocationControl<org.mockito.stubbing.OngoingStubbing<T>> createNewInvocationControl(java.lang.Class<T> type, java.lang.Class<T> unmockedType)
-
withAnyArguments
public org.mockito.stubbing.OngoingStubbing<T> withAnyArguments() throws java.lang.Exception
- Specified by:
withAnyArguments
in interfaceWithAnyArguments<T>
- Throws:
java.lang.Exception
-
createParamArgMatcher
private java.lang.Object createParamArgMatcher(java.lang.Class<?> paramType)
-
withNoArguments
public org.mockito.stubbing.OngoingStubbing<T> withNoArguments() throws java.lang.Exception
- Specified by:
withNoArguments
in interfaceWithoutExpectedArguments<T>
- Throws:
java.lang.Exception
-
withParameterTypes
public WithExpectedArguments<T> withParameterTypes(java.lang.Class<?> parameterType, java.lang.Class<?>... additionalParameterTypes)
- Specified by:
withParameterTypes
in interfaceWithExpectedParameterTypes<T>
-
getMockCreator
private DefaultMockCreator getMockCreator()
-
createNewInvocationControl
private NewInvocationControl<org.mockito.stubbing.OngoingStubbing<T>> createNewInvocationControl(InvocationSubstitute<T> mock)
-
setParameterTypes
void setParameterTypes(java.lang.Class<?>[] parameterTypes)
-
-