Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13507/input/javasrc/biz/xsoftware/test/mock
Modified Files:
TestMockCreator.java
Log Message:
fix the breakage of default return value not working.
Index: TestMockCreator.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock/TestMockCreator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestMockCreator.java 10 Jun 2006 12:41:03 -0000 1.2
--- TestMockCreator.java 10 Jun 2006 12:54:36 -0000 1.3
***************
*** 153,156 ****
--- 153,170 ----
}
+ public void testDefaultRetVal() {
+ MockObject mock = MockObjectFactory.createMock(Identical.class);
+
+ mock.setDefaultReturnValue("doThat", new byte[] {4});
+
+ Identical ident = (Identical)mock;
+ byte[] retVal = ident.doThat(null);
+
+ mock.expectCall("doThat");
+
+ assertEquals(1, retVal.length);
+ assertEquals(4, retVal[0]);
+ }
+
public void testBehavior() {
MockObject mock = MockObjectFactory.createMock(Identical.class);
|