Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22444/input/javasrc/biz/xsoftware/test/mock2
Modified Files:
TestMockCreator.java
Log Message:
add another test that is broken.
Index: TestMockCreator.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/TestMockCreator.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** TestMockCreator.java 5 Apr 2006 23:51:38 -0000 1.16
--- TestMockCreator.java 5 Apr 2006 23:55:16 -0000 1.17
***************
*** 141,144 ****
--- 141,168 ----
}
}
+
+ public void xxxtestTooManyMethodsCalled() throws Exception {
+ MockObject m = MockObjectFactory.createMock(ListenerOne.class);
+ ListenerOne l = (ListenerOne) m;
+
+ String methodName1 = "callMeFirst";
+ String methodName2 = "callMeSecond";
+ m.expect(methodName1);
+ m.expect(methodName2);
+
+ String param = "some params";
+ l.callMeSecond(param);
+ int var1 = 4;
+ l.callMeFirst(var1);
+ //this last one should make verify fail as we don't expect it
+ l.callMeFirst(var1);
+
+ try {
+ m.verify();
+ fail("Should have thrown exception and did not, methods were called in wrong order");
+ } catch(ExpectFailedException e) {
+ //expect should fail, methods were called in wrong order.
+ }
+ }
public void testTwoMethodsOnThread() throws Exception {
|