Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6177/input/javasrc/biz/xsoftware/test/mock2
Modified Files:
TestMockCreator.java
Log Message:
changed implementation from branch and merged the second one to HEAD
Index: TestMockCreator.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/test/mock2/TestMockCreator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestMockCreator.java 17 Feb 2006 15:07:40 -0000 1.3
--- TestMockCreator.java 23 Feb 2006 11:36:32 -0000 1.4
***************
*** 1,4 ****
--- 1,5 ----
package biz.xsoftware.test.mock2;
+ import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
***************
*** 166,169 ****
--- 167,195 ----
}
+
+ public void testExceptionThrows() throws Exception{
+ MockObject m=MockObjectFactory.createMock(ListenerOne.class);
+ ListenerOne l=(ListenerOne)m;
+
+ String methodName="callMeSecond";
+ String message="Make sure systemUnderTest handles exception";
+ CalledMethod calledMethod=m.expect(methodName,new IOException(message));
+
+
+ String param="params";
+ try{
+ l.callMeSecond(param);
+ fail("Exception should be thrown earlier, try to find why it did not!!!");
+ } catch (IOException e) {
+
+ assertEquals(message,e.getMessage());
+ }
+
+ m.verify();
+ }
+
+ public void testExpectWithBehavior()throws Exception {
+ MockObject m=MockObjectFactory.createMock(ListenerOne.class);
+ }
}
|