1 7 package com.inversoft.verge.mvc.controller.actionflow.test; 8 9 10 import junit.framework.Assert; 11 12 import com.inversoft.verge.mvc.controller.actionflow.ActionFlowAction; 13 14 15 20 public class ActionHandler2 { 21 22 private static boolean exceptionCalled; 23 public static boolean step3; 24 25 26 29 public ActionHandler2() { 30 exceptionCalled = false; 31 } 32 33 34 37 public Object handleException(ActionFlowAction action) { 38 exceptionCalled = true; 39 Assert.assertTrue("Action should be the exception", 40 action.getAction()instanceof Exception ); 41 System.out.println("Handling Exception in ActionHandler2"); 42 return "successException"; 43 } 44 45 48 public Object handleThreeStep3(ActionFlowAction action) { 49 step3 = true; 50 System.out.println("Handling threeStep3 in ActionHandler2"); 51 return "success"; 52 } 53 54 57 public static boolean isExceptionCalled() { 58 return exceptionCalled; 59 } 60 } 61 | Popular Tags |