Update of /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/examples/basic
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20057/input/javasrc/biz/xsoftware/examples/basic
Modified Files:
TestExample.java
Log Message:
refactor mocklib back to original api.
Index: TestExample.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib3/input/javasrc/biz/xsoftware/examples/basic/TestExample.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TestExample.java 11 Sep 2006 03:47:39 -0000 1.4
--- TestExample.java 13 Sep 2006 03:09:00 -0000 1.5
***************
*** 113,117 ****
//we want to tell mockCreditSvc to simulate a failure
//by throwing an exception on the takeMoney method call
! mockCreditSvc.addThrowException(new IllegalStateException("cause failure"), "takeMoney");
String user = "user1";
--- 113,117 ----
//we want to tell mockCreditSvc to simulate a failure
//by throwing an exception on the takeMoney method call
! mockCreditSvc.addThrowException("takeMoney", new IllegalStateException("cause failure"));
String user = "user1";
***************
*** 133,137 ****
public void testFailureOfBuyingGiftCard() {
//Now, we want to simulate a failure that should cause recovery to occur....
! mockGiftSvc.addThrowException(new RuntimeException("cause failure in subsystem"), "putMoneyOnCard");
String user = "userXXX";
--- 133,137 ----
public void testFailureOfBuyingGiftCard() {
//Now, we want to simulate a failure that should cause recovery to occur....
! mockGiftSvc.addThrowException("putMoneyOnCard", new RuntimeException("cause failure in subsystem"));
String user = "userXXX";
|