Source Code Cross Referenced for BasicConnectorTestCaseAdapter.java in  » Testing » mockrunner-0.4 » com » mockrunner » connector » 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 » Testing » mockrunner 0.4 » com.mockrunner.connector 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.mockrunner.connector;
002:
003:        import java.util.List;
004:
005:        import junit.framework.TestCase;
006:
007:        import com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory;
008:
009:        /**
010:         * Delegator for {@link com.mockrunner.connector.ConnectorTestModule}. You can
011:         * subclass this adapter or use {@link com.mockrunner.connector.ConnectorTestModule}
012:         * directly (so your test case can use another base class).
013:         * This basic adapter can be used if you don't need any other modules. It
014:         * does not extend {@link com.mockrunner.base.BaseTestCase}. If you want
015:         * to use several modules in conjunction, consider subclassing
016:         * {@link com.mockrunner.connector.ConnectorTestCaseAdapter}.
017:         * <b>This class is generated from the {@link com.mockrunner.connector.ConnectorTestModule}
018:         * and should not be edited directly</b>.
019:         */
020:        public abstract class BasicConnectorTestCaseAdapter extends TestCase {
021:            private ConnectorTestModule connectorTestModule;
022:            private ConnectorMockObjectFactory connectorMockObjectFactory;
023:
024:            public BasicConnectorTestCaseAdapter() {
025:
026:            }
027:
028:            public BasicConnectorTestCaseAdapter(String name) {
029:                super (name);
030:            }
031:
032:            protected void tearDown() throws Exception {
033:                super .tearDown();
034:                connectorTestModule = null;
035:                connectorMockObjectFactory = null;
036:            }
037:
038:            /**
039:             * Creates the {@link com.mockrunner.connector.ConnectorTestModule}. If you
040:             * overwrite this method, you must call <code>super.setUp()</code>.
041:             */
042:            protected void setUp() throws Exception {
043:                super .setUp();
044:                connectorTestModule = createConnectorTestModule(getConnectorMockObjectFactory());
045:            }
046:
047:            /**
048:             * Creates a {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}.
049:             * @return the created {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}
050:             */
051:            protected ConnectorMockObjectFactory createConnectorMockObjectFactory() {
052:                return new ConnectorMockObjectFactory();
053:            }
054:
055:            /**
056:             * Gets the {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}.
057:             * @return the {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}
058:             */
059:            protected ConnectorMockObjectFactory getConnectorMockObjectFactory() {
060:                synchronized (ConnectorMockObjectFactory.class) {
061:                    if (connectorMockObjectFactory == null) {
062:                        connectorMockObjectFactory = createConnectorMockObjectFactory();
063:                    }
064:                }
065:                return connectorMockObjectFactory;
066:            }
067:
068:            /**
069:             * Sets the {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}.
070:             * @param connectorMockObjectFactory the {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}
071:             */
072:            protected void setConnectorMockObjectFactory(
073:                    ConnectorMockObjectFactory connectorMockObjectFactory) {
074:                this .connectorMockObjectFactory = connectorMockObjectFactory;
075:            }
076:
077:            /**
078:             * Creates a {@link com.mockrunner.connector.ConnectorTestModule} based on the current
079:             * {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}.
080:             * Same as <code>createConnectorTestModule(getConnectorMockObjectFactory())</code>.
081:             * @return the created {@link com.mockrunner.connector.ConnectorTestModule}
082:             */
083:            protected ConnectorTestModule createConnectorTestModule() {
084:                return new ConnectorTestModule(getConnectorMockObjectFactory());
085:            }
086:
087:            /**
088:             * Creates a {@link com.mockrunner.connector.ConnectorTestModule} with the specified
089:             * {@link com.mockrunner.mock.connector.cci.ConnectorMockObjectFactory}.
090:             * @return the created {@link com.mockrunner.connector.ConnectorTestModule}
091:             */
092:            protected ConnectorTestModule createConnectorTestModule(
093:                    ConnectorMockObjectFactory mockFactory) {
094:                return new ConnectorTestModule(mockFactory);
095:            }
096:
097:            /**
098:             * Gets the {@link com.mockrunner.connector.ConnectorTestModule}.
099:             * @return the {@link com.mockrunner.connector.ConnectorTestModule}
100:             */
101:            protected ConnectorTestModule getConnectorTestModule() {
102:                return connectorTestModule;
103:            }
104:
105:            /**
106:             * Sets the {@link com.mockrunner.connector.ConnectorTestModule}.
107:             * @param connectorTestModule the {@link com.mockrunner.connector.ConnectorTestModule}
108:             */
109:            protected void setConnectorTestModule(
110:                    ConnectorTestModule connectorTestModule) {
111:                this .connectorTestModule = connectorTestModule;
112:            }
113:
114:            /**
115:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyConnectionClosed}
116:             */
117:            protected void verifyConnectionClosed() {
118:                connectorTestModule.verifyConnectionClosed();
119:            }
120:
121:            /**
122:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getInteractionHandler}
123:             */
124:            protected InteractionHandler getInteractionHandler() {
125:                return connectorTestModule.getInteractionHandler();
126:            }
127:
128:            /**
129:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getInteractionList}
130:             */
131:            protected List getInteractionList() {
132:                return connectorTestModule.getInteractionList();
133:            }
134:
135:            /**
136:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedIndexedRecords(String)}
137:             */
138:            protected List getCreatedIndexedRecords(String recordName) {
139:                return connectorTestModule.getCreatedIndexedRecords(recordName);
140:            }
141:
142:            /**
143:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedIndexedRecords}
144:             */
145:            protected List getCreatedIndexedRecords() {
146:                return connectorTestModule.getCreatedIndexedRecords();
147:            }
148:
149:            /**
150:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedMappedRecords(String)}
151:             */
152:            protected List getCreatedMappedRecords(String recordName) {
153:                return connectorTestModule.getCreatedMappedRecords(recordName);
154:            }
155:
156:            /**
157:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedMappedRecords}
158:             */
159:            protected List getCreatedMappedRecords() {
160:                return connectorTestModule.getCreatedMappedRecords();
161:            }
162:
163:            /**
164:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyAllInteractionsClosed}
165:             */
166:            protected void verifyAllInteractionsClosed() {
167:                connectorTestModule.verifyAllInteractionsClosed();
168:            }
169:
170:            /**
171:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyInteractionClosed(int)}
172:             */
173:            protected void verifyInteractionClosed(int index) {
174:                connectorTestModule.verifyInteractionClosed(index);
175:            }
176:
177:            /**
178:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedIndexedRecords(int)}
179:             */
180:            protected void verifyNumberCreatedIndexedRecords(int expected) {
181:                connectorTestModule.verifyNumberCreatedIndexedRecords(expected);
182:            }
183:
184:            /**
185:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedIndexedRecords(String, int)}
186:             */
187:            protected void verifyNumberCreatedIndexedRecords(String recordName,
188:                    int expected) {
189:                connectorTestModule.verifyNumberCreatedIndexedRecords(
190:                        recordName, expected);
191:            }
192:
193:            /**
194:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedMappedRecords(int)}
195:             */
196:            protected void verifyNumberCreatedMappedRecords(int expected) {
197:                connectorTestModule.verifyNumberCreatedMappedRecords(expected);
198:            }
199:
200:            /**
201:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedMappedRecords(String, int)}
202:             */
203:            protected void verifyNumberCreatedMappedRecords(String recordName,
204:                    int expected) {
205:                connectorTestModule.verifyNumberCreatedMappedRecords(
206:                        recordName, expected);
207:            }
208:
209:            /**
210:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionCommitted}
211:             */
212:            protected void verifyLocalTransactionCommitted() {
213:                connectorTestModule.verifyLocalTransactionCommitted();
214:            }
215:
216:            /**
217:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionNotCommitted}
218:             */
219:            protected void verifyLocalTransactionNotCommitted() {
220:                connectorTestModule.verifyLocalTransactionNotCommitted();
221:            }
222:
223:            /**
224:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionRolledBack}
225:             */
226:            protected void verifyLocalTransactionRolledBack() {
227:                connectorTestModule.verifyLocalTransactionRolledBack();
228:            }
229:
230:            /**
231:             * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionNotRolledBack}
232:             */
233:            protected void verifyLocalTransactionNotRolledBack() {
234:                connectorTestModule.verifyLocalTransactionNotRolledBack();
235:            }
236:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.