Class MethodStubStrategyImpl<T>
- java.lang.Object
-
- org.powermock.api.support.membermodification.strategy.impl.MethodStubStrategyImpl<T>
-
- All Implemented Interfaces:
MethodStubStrategy<T>
public class MethodStubStrategyImpl<T> extends java.lang.Object implements MethodStubStrategy<T>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Methodmethod
-
Constructor Summary
Constructors Constructor Description MethodStubStrategyImpl(java.lang.reflect.Method method)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidandReturn(T returnValue)Deprecated.voidtoReturn(T returnValue)Stubs the method to return the specified returnValue.voidtoThrow(java.lang.Throwable throwable)Stubs the method to throw the specified throwable.
-
-
-
Method Detail
-
andReturn
@Deprecated public void andReturn(T returnValue)
Deprecated.Description copied from interface:MethodStubStrategyStubs the method to return the specified returnValue.- Specified by:
andReturnin interfaceMethodStubStrategy<T>- Parameters:
returnValue- The value that will be returned.
-
toThrow
public void toThrow(java.lang.Throwable throwable)
Description copied from interface:MethodStubStrategyStubs the method to throw the specified throwable.- Specified by:
toThrowin interfaceMethodStubStrategy<T>- Parameters:
throwable- the throwable
-
toReturn
public void toReturn(T returnValue)
Description copied from interface:MethodStubStrategyStubs the method to return the specified returnValue.- Specified by:
toReturnin interfaceMethodStubStrategy<T>- Parameters:
returnValue- The value that will be returned.
-
-