Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25564/input/javasrc/biz/xsoftware/test/mock2
Modified Files:
Tag: branchForOffice
TestMockCreator.java
Log Message:
for home
Index: TestMockCreator.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/Attic/TestMockCreator.java,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** TestMockCreator.java 18 Jan 2006 03:42:56 -0000 1.1.2.6
--- TestMockCreator.java 18 Jan 2006 09:45:09 -0000 1.1.2.7
***************
*** 33,60 ****
}
! // public void testTwoMethods() throws Exception {
! // MockObject m = MockObjectFactory.createMock(ListenerOne.class);
! // ListenerOne l=(ListenerOne)m;
! //
! // String methodName1 = "callMeFirst";
! // String methodName2="callMeSecond";
! // CalledMethod callMeFirst =m.expect(methodName1);
! // CalledMethod callMeSecond=m.expect(methodName2);
! //
! // int var1 = 4;
! // l.callMeFirst(var1);
! // String param="some params";
! // l.callMeSecond(param);
! //
! // 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 testTwoMethodsOnThread() throws Exception {
--- 33,60 ----
}
! public void testTwoMethods() throws Exception {
! MockObject m = MockObjectFactory.createMock(ListenerOne.class);
! ListenerOne l=(ListenerOne)m;
!
! String methodName1 = "callMeFirst";
! String methodName2="callMeSecond";
! CalledMethod callMeFirst =m.expect(methodName1);
! CalledMethod callMeSecond=m.expect(methodName2);
!
! int var1 = 4;
! l.callMeFirst(var1);
! String param="some params";
! l.callMeSecond(param);
!
! 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 testTwoMethodsOnThread() throws Exception {
|