Update of /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20057/input/javasrc/biz/xsoftware/impl/mock
Modified Files:
MockSuperclass.java
Log Message:
refactor mocklib back to original api.
Index: MockSuperclass.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock/MockSuperclass.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MockSuperclass.java 12 Sep 2006 15:02:11 -0000 1.2
--- MockSuperclass.java 13 Sep 2006 03:09:00 -0000 1.3
***************
*** 508,517 ****
}
! public void setDefaultBehavior(Behavior b, String method)
{
! setDefaultBehavior(b, method, new Class[] {});
}
! public void setDefaultBehavior(Behavior b, String method, Class... argTypes) {
checkMethod(method, argTypes);
if(b == null)
--- 508,517 ----
}
! public void setDefaultBehavior(String method, Behavior b)
{
! setDefaultBehavior(method, b, new Class[] {});
}
! public void setDefaultBehavior(String method, Behavior b, Class... argTypes) {
checkMethod(method, argTypes);
if(b == null)
***************
*** 520,529 ****
}
! public void setDefaultReturnValue(Object returnValue, String method)
{
! setDefaultReturnValue(returnValue, method, new Class[] {});
}
! public void setDefaultReturnValue(Object o, String method, Class... argTypes) {
checkMethod(method, argTypes);
--- 520,529 ----
}
! public void setDefaultReturnValue(String method, Object returnValue)
{
! setDefaultReturnValue(method, returnValue, new Class[] {});
}
! public void setDefaultReturnValue(String method, Object o, Class... argTypes) {
checkMethod(method, argTypes);
***************
*** 531,540 ****
}
! public void addBehavior(Behavior behavior, String method)
{
! addBehavior(behavior, method, new Class[] {});
}
! public void addBehavior(Behavior behavior, String method, Class... argTypes) {
if(behavior == null)
throw new IllegalArgumentException("behavior parameter cannot be null");
--- 531,540 ----
}
! public void addBehavior(String method, Behavior behavior)
{
! addBehavior(method, behavior, new Class[] {});
}
! public void addBehavior(String method, Behavior behavior, Class... argTypes) {
if(behavior == null)
throw new IllegalArgumentException("behavior parameter cannot be null");
***************
*** 572,584 ****
}
! public void addThrowException(Throwable e, String method)
{
! addThrowException(e, method, new Class[] {});
}
/**
! * @see biz.xsoftware.mock.MockObject#addThrowException(java.lang.Throwable, java.lang.String, Class...)
*/
! public synchronized void addThrowException(Throwable e, String method, Class... argTypes) {
if(e == null)
throw new IllegalArgumentException("e parameter to this method cannot be null");
--- 572,584 ----
}
! public void addThrowException(String method, Throwable e)
{
! addThrowException(method, e, new Class[] {});
}
/**
! * @see biz.xsoftware.mock.MockObject#addThrowException(java.lang.String, java.lang.Throwable, Class...)
*/
! public synchronized void addThrowException(String method, Throwable e, Class... argTypes) {
if(e == null)
throw new IllegalArgumentException("e parameter to this method cannot be null");
***************
*** 588,600 ****
! public void addReturnValue(Object o, String method)
{
! addReturnValue(o, method, new Class[] {});
}
/**
! * @see biz.xsoftware.mock.MockObject#addReturnValue(java.lang.Object, java.lang.String, Class...)
*/
! public synchronized void addReturnValue(Object o, String method, Class... argTypes) {
Action action = new ReturnValue(o);
addToActionList(action, method, argTypes);
--- 588,600 ----
! public void addReturnValue(String method, Object o)
{
! addReturnValue(method, o, new Class[] {});
}
/**
! * @see biz.xsoftware.mock.MockObject#addReturnValue(java.lang.String, java.lang.Object, Class...)
*/
! public synchronized void addReturnValue(String method, Object o, Class... argTypes) {
Action action = new ReturnValue(o);
addToActionList(action, method, argTypes);
|