Source Code Cross Referenced for MyActs.java in  » Workflow-Engines » wfmopen-2.1.1 » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » wfmopen 2.1.1 » util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Danet GmbH
003:         * Beratung und Software-Entwicklung
004:         * Geschäftstelle AN
005:         *
006:         * $Id: MyActs.java,v 1.2 2007/03/27 21:59:42 mlipp Exp $
007:         *
008:         * $Log: MyActs.java,v $
009:         * Revision 1.2  2007/03/27 21:59:42  mlipp
010:         * Fixed lots of checkstyle warnings.
011:         *
012:         * Revision 1.1.1.1  2003/06/30 20:07:00  drmlipp
013:         * Initial import
014:         *
015:         * Revision 1.1  2001/11/19 15:07:07  schlue
016:         * Unit tests for web actions added
017:         *
018:         *
019:         *
020:         */
021:        package util;
022:
023:        import javax.servlet.http.HttpServletRequest;
024:        import java.lang.reflect.InvocationTargetException;
025:
026:        import de.danet.an.util.web.action.WebActionHandler;
027:        import de.danet.an.util.web.action.WebActionDispatcher;
028:
029:        /**
030:         * Test class for web action handlers
031:         */
032:        public class MyActs extends WebActionHandler {
033:            public MyActs(String method) {
034:                super (method);
035:            }
036:
037:            public static WebActionDispatcher suite()
038:                    throws IllegalAccessException, InvocationTargetException {
039:                WebActionDispatcher suite = new WebActionDispatcher();
040:                // Test method name that has not been defined
041:                try {
042:                    suite.addHandler(new MyActs("notDefined"));
043:                    throw new IllegalArgumentException(
044:                            "Illegal action method not detected");
045:                } catch (IllegalArgumentException exc) {
046:                }
047:
048:                // Test method name that has been defined twice
049:                try {
050:                    suite.addHandler(new MyActs("twiceDefined"));
051:                    throw new IllegalArgumentException(
052:                            "Illegal action method not detected");
053:                } catch (IllegalArgumentException exc) {
054:                }
055:
056:                // Test method with illegal return value
057:                try {
058:                    suite.addHandler(new MyActs("illegalReturnValue"));
059:                    throw new IllegalArgumentException(
060:                            "Illegal action method not detected");
061:                } catch (IllegalArgumentException exc) {
062:                }
063:
064:                // Test method with illegal parameters
065:                try {
066:                    suite.addHandler(new MyActs("illegalFirstParameter"));
067:                    throw new IllegalArgumentException(
068:                            "Illegal action method not detected");
069:                } catch (IllegalArgumentException exc) {
070:                }
071:                try {
072:                    suite.addHandler(new MyActs("illegalSecondParameter"));
073:                    throw new IllegalArgumentException(
074:                            "Illegal action method not detected");
075:                } catch (IllegalArgumentException exc) {
076:                }
077:
078:                // Now some valid action methods
079:                suite.addHandler(new MyActs("validMethod1Param1"));
080:                suite.addHandler(new MyActs("validMethod1Param2"));
081:                suite.addHandler(new MyActs("validMethod2Params1"));
082:                suite.addHandler(new MyActs("validMethod2Params2"));
083:
084:                return suite;
085:            }
086:
087:            public void twiceDefined(String arg1) {
088:            }
089:
090:            public void twiceDefined(HttpServletRequest arg1) {
091:            }
092:
093:            public int illegalReturnValue(HttpServletRequest arg1, Object arg2) {
094:                return 0;
095:            }
096:
097:            public void illegalFirstParameter(int arg1, String arg2) {
098:            }
099:
100:            public void illegalSecondParameter(HttpServletRequest arg1,
101:                    HttpServletRequest arg2) {
102:            }
103:
104:            public void validMethod1Param1(HttpServletRequest arg1) {
105:            }
106:
107:            public void validMethod1Param2(String arg1) {
108:            }
109:
110:            public void validMethod2Params1(HttpServletRequest arg1, String arg2) {
111:            }
112:
113:            public void validMethod2Params2(String arg1, String arg2) {
114:            }
115:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.