Package de.danet.an.util.web.action

Examples of de.danet.an.util.web.action.WebActionDispatcher


      super(method);
  }
 
    public static WebActionDispatcher suite()
    throws IllegalAccessException, InvocationTargetException {
  WebActionDispatcher suite = new WebActionDispatcher();
  // Test method name that has not been defined
  try {
      suite.addHandler (new MyActs("notDefined"));
      throw new IllegalArgumentException("Illegal action method not detected");
  } catch (IllegalArgumentException exc ) {
  }
 
  // Test method name that has been defined twice
  try {
      suite.addHandler (new MyActs("twiceDefined"));
      throw new IllegalArgumentException("Illegal action method not detected");
  } catch (IllegalArgumentException exc ) {
  }

  // Test method with illegal return value
  try {
      suite.addHandler (new MyActs("illegalReturnValue"));
      throw new IllegalArgumentException("Illegal action method not detected");
  } catch (IllegalArgumentException exc ) {
  }

  // Test method with illegal parameters
  try {
      suite.addHandler (new MyActs("illegalFirstParameter"));
      throw new IllegalArgumentException("Illegal action method not detected");
  } catch (IllegalArgumentException exc ) {
  }
  try {
      suite.addHandler (new MyActs("illegalSecondParameter"));
      throw new IllegalArgumentException("Illegal action method not detected");
  } catch (IllegalArgumentException exc ) {
  }

  // Now some valid action methods
  suite.addHandler (new MyActs("validMethod1Param1"));
  suite.addHandler (new MyActs("validMethod1Param2"));
  suite.addHandler (new MyActs("validMethod2Params1"));
  suite.addHandler (new MyActs("validMethod2Params2"));
 
  return suite;
    }
View Full Code Here

TOP

Related Classes of de.danet.an.util.web.action.WebActionDispatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.