Source Code Cross Referenced for ProcessRelevantDataTests.java in  » Workflow-Engines » wfmopen-2.1.1 » load » 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 » load 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of the WfMOpen project.
003:         * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
004:         * All rights reserved.
005:         *
006:         * This program is free software; you can redistribute it and/or modify
007:         * it under the terms of the GNU General Public License as published by
008:         * the Free Software Foundation; either version 2 of the License, or
009:         * (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         *
020:         * $Id: ProcessRelevantDataTests.java,v 1.2 2006/09/29 12:32:07 drmlipp Exp $
021:         */
022:        package load;
023:
024:        import java.util.HashMap;
025:        import java.util.Map;
026:
027:        import javax.security.auth.login.LoginException;
028:
029:        import de.danet.an.util.junit.EJBClientTest;
030:        import de.danet.an.util.junit.NamedTestGroup;
031:
032:        import de.danet.an.workflow.omgcore.ProcessData;
033:
034:        import de.danet.an.workflow.api.DefaultProcessData;
035:
036:        import com.clarkware.junitperf.ConstantTimer;
037:        import com.clarkware.junitperf.LoadTest;
038:        import common.STProjectLoginContext;
039:        import junit.framework.Test;
040:        import junit.framework.TestCase;
041:        import junit.framework.TestSuite;
042:
043:        /**
044:         * This class provides ...
045:         *
046:         * @author <a href="weidauer@danet.de">Christian Weidauer</a>
047:         * @version $Revision: 1.2 $
048:         */
049:
050:        public class ProcessRelevantDataTests extends TestCase {
051:
052:            private static STProjectLoginContext plc = null;
053:            static {
054:                try {
055:                    plc = new STProjectLoginContext();
056:                    plc.login();
057:                } catch (LoginException e) {
058:                    throw new IllegalStateException(e.getMessage());
059:                }
060:            }
061:
062:            /**
063:             * Creates an instance of <code>ProcessRelevantDataTests</code>
064:             * @param name the test suite name
065:             */
066:            public ProcessRelevantDataTests(String name) {
067:                super (name);
068:            }
069:
070:            /**
071:             * Make this test suite.
072:             * @return the test suite
073:             */
074:            public static Test suite() {
075:                TestSuite rootSuite = new TestSuite();
076:
077:                rootSuite.addTest(prepareSuite());
078:
079:                Map tg = new HashMap();
080:                tg.put("title",
081:                        "Create processes with a variable number of process datas "
082:                                + "and start them");
083:                rootSuite.addTest(new NamedTestGroup(createAndStartSuite(),
084:                        "TestGroup", tg));
085:
086:                tg = new HashMap();
087:                tg.put("title",
088:                        "Create processes with a variable number of process datas, "
089:                                + "initialize and start them ");
090:                rootSuite.addTest(new NamedTestGroup(
091:                        createStartAndInitializeSuite(), "TestGroup", tg));
092:                return new EJBClientTest(plc, rootSuite);
093:            }
094:
095:            private static TestSuite prepareSuite() {
096:                TestSuite suite = new TestSuite();
097:                suite.addTest(new GenericTest("prepareForCreateProcess",
098:                        "A5T6comCyNoImplPrRelData5"));
099:                suite.addTest(new GenericTest("prepareForCreateProcess",
100:                        "A5T6comCyNoImplPrRelData10"));
101:                suite.addTest(new GenericTest("prepareForCreateProcess",
102:                        "A5T6comCyNoImplPrRelData20"));
103:                return suite;
104:            }
105:
106:            private static TestSuite createAndStartSuite() {
107:                TestSuite suite = new TestSuite();
108:                addTest(suite, "5 Process Relevant Datas and 5 Activities "
109:                        + "(A5T6comCyNoImplPrRelData5)", new GenericTest(
110:                        "createAndStartProcess", "A5T6comCyNoImplPrRelData5"));
111:                addTest(suite, "10 Process Relevant Datas and 5 Activities "
112:                        + " (A5T6comCyNoImplPrRelData10)", new GenericTest(
113:                        "createAndStartProcess", "A5T6comCyNoImplPrRelData10"));
114:                addTest(suite, "20 Process Relevant Datas and 5 Activities "
115:                        + " (A5T6comCyNoImplPrRelData20)", new GenericTest(
116:                        "createAndStartProcess", "A5T6comCyNoImplPrRelData20"));
117:                return suite;
118:            }
119:
120:            private static TestSuite createStartAndInitializeSuite() {
121:                TestSuite suite = new TestSuite();
122:                ProcessData initialProcessData5 = new DefaultProcessData();
123:                initialProcessData5.put("d1", "Initial Data 1");
124:                initialProcessData5.put("d2", "Initial Data 2");
125:                initialProcessData5.put("d3", "Initial Data 3");
126:                initialProcessData5.put("d4", "Initial Data 4");
127:                initialProcessData5.put("d5", "Initial Data 5");
128:                addTest(suite, "5 Process Relevant Datas And 5 Activities "
129:                        + " (A5T6comCyNoImplPrRelData5)", new GenericTest(
130:                        "createStartAndInitializeProcess",
131:                        "A5T6comCyNoImplPrRelData5", initialProcessData5));
132:
133:                ProcessData initialProcessData10 = new DefaultProcessData(
134:                        initialProcessData5);
135:                initialProcessData10.put("d6", "Initial Data 6");
136:                initialProcessData10.put("d7", "Initial Data 7");
137:                initialProcessData10.put("d8", "Initial Data 8");
138:                initialProcessData10.put("d9", "Initial Data 9");
139:                initialProcessData10.put("d10", "Initial Data 10");
140:                addTest(suite, "10 Process Relevant Datas And 5 Activities "
141:                        + " (A5T6comCyNoImplPrRelData10)", new GenericTest(
142:                        "createStartAndInitializeProcess",
143:                        "A5T6comCyNoImplPrRelData10", initialProcessData10));
144:
145:                ProcessData initialProcessData20 = new DefaultProcessData(
146:                        initialProcessData10);
147:                initialProcessData20.put("d11", "Initial Data 11");
148:                initialProcessData20.put("d12", "Initial Data 12");
149:                initialProcessData20.put("d13", "Initial Data 13");
150:                initialProcessData20.put("d14", "Initial Data 14");
151:                initialProcessData20.put("d15", "Initial Data 15");
152:                initialProcessData20.put("d16", "Initial Data 16");
153:                initialProcessData20.put("d17", "Initial Data 17");
154:                initialProcessData20.put("d18", "Initial Data 18");
155:                initialProcessData20.put("d19", "Initial Data 19");
156:                initialProcessData20.put("d20", "Initial Data 20");
157:                addTest(suite, "20 Process Relevant Datas And 5 Activities "
158:                        + "(A5T6comCyNoImplPrRelData10)", new GenericTest(
159:                        "createStartAndInitializeProcess",
160:                        "A5T6comCyNoImplPrRelData20", initialProcessData20));
161:
162:                return suite;
163:            }
164:
165:            private static void addTest(TestSuite parentSuite, String title,
166:                    Test testCase) {
167:                TestSuite suite = new TestSuite();
168:                Map sas = new HashMap();
169:                sas.put("users", "1");
170:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 1, 20,
171:                        new ConstantTimer(10)), "Samples", sas));
172:                suite.addTest(GenericTest.cleaningSuite());
173:
174:                sas.put("users", "2");
175:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 2, 10,
176:                        new ConstantTimer(10)), "Samples", sas));
177:                suite.addTest(GenericTest.cleaningSuite());
178:
179:                sas.put("users", "4");
180:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 4, 5,
181:                        new ConstantTimer(10)), "Samples", sas));
182:                suite.addTest(GenericTest.cleaningSuite());
183:
184:                sas.put("users", "5");
185:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 5, 4,
186:                        new ConstantTimer(10)), "Samples", sas));
187:                suite.addTest(GenericTest.cleaningSuite());
188:
189:                sas.put("users", "10");
190:                suite.addTest(new NamedTestGroup(new LoadTest(testCase, 10, 2,
191:                        new ConstantTimer(10)), "Samples", sas));
192:                suite.addTest(GenericTest.cleaningSuite());
193:
194:                Map tt = new HashMap();
195:                tt.put("title", title);
196:                parentSuite.addTest(new NamedTestGroup(suite, "Test", tt));
197:            }
198:
199:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.