Class DefaultConstructorExpectationSetup<T>
- java.lang.Object
-
- org.powermock.api.mockito.internal.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 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 Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> org.mockito.stubbing.OngoingStubbing<T>
createNewSubstituteMock(java.lang.Class<T> type, java.lang.Class<?>[] parameterTypes, java.lang.Object... arguments)
(package private) void
setParameterTypes(java.lang.Class<?>[] parameterTypes)
org.mockito.stubbing.OngoingStubbing<T>
withAnyArguments()
(package private) org.mockito.stubbing.OngoingStubbing<T>
withArguments(java.lang.Object[] additionalArguments)
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
-
parameterTypes
private java.lang.Class<?>[] parameterTypes
-
mockType
private final java.lang.Class<T> mockType
-
arrayMerger
private final ArrayMerger arrayMerger
-
-
Constructor Detail
-
DefaultConstructorExpectationSetup
public DefaultConstructorExpectationSetup(java.lang.Class<T> mockType)
-
-
Method Detail
-
setParameterTypes
void setParameterTypes(java.lang.Class<?>[] parameterTypes)
-
withArguments
org.mockito.stubbing.OngoingStubbing<T> withArguments(java.lang.Object[] additionalArguments) throws java.lang.Exception
- Throws:
java.lang.Exception
-
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
-
withAnyArguments
public org.mockito.stubbing.OngoingStubbing<T> withAnyArguments() throws java.lang.Exception
- Specified by:
withAnyArguments
in interfaceWithAnyArguments<T>
- Throws:
java.lang.Exception
-
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>
-
createNewSubstituteMock
private static <T> 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
-
-