org.kuali.student.common.test.mock
Class MockArgumentMapper

java.lang.Object
  extended by org.kuali.student.common.test.mock.MockArgumentMapper

public class MockArgumentMapper
extends Object

Use this mapper to set method return for mock proxy to return values you based on predefined arguments. NOTE: Currently only supports single argument methods.


Field Summary
private  Map<Object,Object> argumentMapper
           
 
Constructor Summary
MockArgumentMapper()
           
 
Method Summary
 Map<Object,Object> getArgumentMapper()
           
 Object getReturnValue(Object[] arguments)
          This method returns the return value for the specified arguments
 void setArgumentMapper(Map<Object,Object> argumentMapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

argumentMapper

private Map<Object,Object> argumentMapper
Constructor Detail

MockArgumentMapper

public MockArgumentMapper()
Method Detail

getReturnValue

public Object getReturnValue(Object[] arguments)
This method returns the return value for the specified arguments

Parameters:
arguments -
Returns:
return value for arguments.

getArgumentMapper

public Map<Object,Object> getArgumentMapper()
Returns:
the methodReturnMap

setArgumentMapper

public void setArgumentMapper(Map<Object,Object> argumentMapper)
Parameters:
methodReturnMap - the methodReturnMap to set


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.