org.powermock.api.support.membermodification.strategy
Interface MethodStubStrategy<T>

All Known Implementing Classes:
MethodStubStrategyImpl

public interface MethodStubStrategy<T>

Specifies the return value when stubbing a method.


Method Summary
 void andReturn(T returnValue)
          Deprecated. Since version 1.4.1, use toReturn(Object) instead.
 void toReturn(T returnValue)
          Stubs the method to return the specified returnValue.
 void toThrow(Throwable throwable)
          Stubs the method to throw the specified throwable.
 

Method Detail

andReturn

void andReturn(T returnValue)
Deprecated. Since version 1.4.1, use toReturn(Object) instead.

Stubs the method to return the specified returnValue.

Parameters:
returnValue - The value that will be returned.

toReturn

void toReturn(T returnValue)
Stubs the method to return the specified returnValue.

Parameters:
returnValue - The value that will be returned.

toThrow

void toThrow(Throwable throwable)
Stubs the method to throw the specified throwable.

Parameters:
throwable - the throwable


Copyright © 2007-2012. All Rights Reserved.