Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28877/input/javasrc/biz/xsoftware/test/mock2
Modified Files:
Tag: branchForOffice
TestMockCreator.java
Log Message:
Index: TestMockCreator.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/Attic/TestMockCreator.java,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -d -r1.1.2.10 -r1.1.2.11
*** TestMockCreator.java 7 Feb 2006 05:51:19 -0000 1.1.2.10
--- TestMockCreator.java 15 Feb 2006 14:44:57 -0000 1.1.2.11
***************
*** 1,4 ****
--- 1,7 ----
package biz.xsoftware.test.mock2;
+ import java.io.IOException;
+ import java.util.HashMap;
+ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
***************
*** 142,145 ****
--- 145,172 ----
}
}
+
+ public void testExpectWithRetVal() throws Exception{
+ MockObject m=MockObjectFactory.createMock(ListenerOne.class);
+ ListenerOne l=(ListenerOne)m;
+
+ Object returnVal="OK";
+ String methodName="callWithRetVal";
+ CalledMethod method=m.expect(returnVal,methodName);
+
+ String param="some params";
+ String retVal=l.callWithRetVal(param);
+
+ m.verify();
+
+ assertEquals("The method name should be equal",method.getMethodName(),methodName);
+ assertEquals("the params should be the same ",method.getParameters()[0],param);
+ assertEquals("the length of param should be equal",1,method.getParameters().length);
+ assertEquals("the return value should be the same",returnVal,retVal);
+
+ }
+
+ public void testRemoveCalledMethod(){
+
+ }
}
|