Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6623/biz/xsoftware/test/mock2
Modified Files:
Tag: branchForOffice
TestMockCreator.java
Log Message:
add another test case.
Index: TestMockCreator.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/Attic/TestMockCreator.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** TestMockCreator.java 18 Jan 2006 03:38:10 -0000 1.1.2.5
--- TestMockCreator.java 18 Jan 2006 03:42:56 -0000 1.1.2.6
***************
*** 1,4 ****
--- 1,7 ----
package biz.xsoftware.test.mock2;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+
import junit.framework.TestCase;
import biz.xsoftware.mock2.CalledMethod;
***************
*** 8,11 ****
--- 11,16 ----
public class TestMockCreator extends TestCase {
+ private static final Logger log = Logger.getLogger(TestMockCreator.class.getName());
+
public TestMockCreator(String name){
super(name);
***************
*** 52,55 ****
--- 57,102 ----
// assertEquals("param count should be 1", 1, callMeSecond.getParameters().length);
// }
+
+ // public void testTwoMethodsOnThread() throws Exception {
+ // MockObject m = MockObjectFactory.createMock(ListenerOne.class);
+ // final ListenerOne l = (ListenerOne) m;
+ //
+ // String methodName1 = "callMeFirst";
+ // String methodName2 = "callMeSecond";
+ // CalledMethod callMeFirst = m.expect(methodName1);
+ // CalledMethod callMeSecond = m.expect(methodName2);
+ //
+ // final int var1 = 4;
+ // final String param = "some params";
+ // Thread t = new Thread() {
+ // public void run() {
+ // try {
+ // Thread.sleep(1000);
+ // l.callMeFirst(var1);
+ // l.callMeSecond(param);
+ // } catch (Exception e) {
+ // log.log(Level.WARNING, "exception", e);
+ // throw new RuntimeException(e);
+ // }
+ // }
+ // };
+ // t.start();
+ //
+ // m.verify();
+ //
+ // assertEquals("the methodName should be the same", methodName1,
+ // callMeFirst.getMethodName());
+ // assertEquals("params should equal", param,
+ // callMeFirst.getParameters()[0]);
+ // assertEquals("param count should be 1", 1,
+ // callMeFirst.getParameters().length);
+ //
+ // assertEquals("the methodName should be the same", methodName2,
+ // callMeSecond.getMethodName());
+ // assertEquals("params should equal", param,
+ // callMeSecond.getParameters()[0]);
+ // assertEquals("param count should be 1", 1,
+ // callMeSecond.getParameters().length);
+ // }
// public void testFailure() throws Exception {
|