Update of /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10986/input/javasrc/biz/xsoftware/impl/mock
Modified Files:
MockSuperclass.java
Log Message:
added some convenience methods to the interface
Index: MockSuperclass.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/impl/mock/MockSuperclass.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MockSuperclass.java 12 Sep 2006 02:20:58 -0000 1.1
--- MockSuperclass.java 12 Sep 2006 15:02:11 -0000 1.2
***************
*** 120,123 ****
--- 120,128 ----
}
+ public void addIgnore(String method)
+ {
+ addIgnore(method, new Class[] {});
+ }
+
public void addIgnore(String method, Class ... argTypes)
{
***************
*** 125,128 ****
--- 130,138 ----
}
+ public void removeIgnore(String method)
+ {
+ removeIgnore(method, new Class[] {});
+ }
+
public void removeIgnore(String method, Class ... argTypes)
{
***************
*** 497,500 ****
--- 507,515 ----
}
}
+
+ public void setDefaultBehavior(Behavior b, String method)
+ {
+ setDefaultBehavior(b, method, new Class[] {});
+ }
public void setDefaultBehavior(Behavior b, String method, Class... argTypes) {
***************
*** 504,507 ****
--- 519,527 ----
methodToDefaultRetVal.put(method, new BehaviorInfo(b));
}
+
+ public void setDefaultReturnValue(Object returnValue, String method)
+ {
+ setDefaultReturnValue(returnValue, method, new Class[] {});
+ }
public void setDefaultReturnValue(Object o, String method, Class... argTypes) {
***************
*** 510,513 ****
--- 530,538 ----
methodToDefaultRetVal.put(method, new ReturnValue(o));
}
+
+ public void addBehavior(Behavior behavior, String method)
+ {
+ addBehavior(behavior, method, new Class[] {});
+ }
public void addBehavior(Behavior behavior, String method, Class... argTypes) {
***************
*** 547,550 ****
--- 572,580 ----
}
+ 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...)
***************
*** 557,560 ****
--- 587,596 ----
}
+
+ 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...)
|