001: package com.mockrunner.ejb;
002:
003: import javax.jms.ConnectionFactory;
004: import javax.jms.Destination;
005:
006: import org.mockejb.BasicEjbDescriptor;
007: import org.mockejb.TransactionPolicy;
008:
009: import com.mockrunner.base.BaseTestCase;
010:
011: /**
012: * Delegator for {@link com.mockrunner.ejb.EJBTestModule}. You can
013: * subclass this adapter or use {@link com.mockrunner.ejb.EJBTestModule}
014: * directly (so your test case can use another base class).
015: * This adapter extends {@link com.mockrunner.base.BaseTestCase}.
016: * It can be used if you want to use several modules in conjunction.
017: * <b>This class is generated from the {@link com.mockrunner.ejb.EJBTestModule}
018: * and should not be edited directly</b>.
019: */
020: public abstract class EJBTestCaseAdapter extends BaseTestCase {
021: private EJBTestModule ejbTestModule;
022:
023: public EJBTestCaseAdapter() {
024:
025: }
026:
027: public EJBTestCaseAdapter(String name) {
028: super (name);
029: }
030:
031: protected void tearDown() throws Exception {
032: super .tearDown();
033: ejbTestModule = null;
034: }
035:
036: /**
037: * Creates the {@link com.mockrunner.ejb.EJBTestModule}. If you
038: * overwrite this method, you must call <code>super.setUp()</code>.
039: */
040: protected void setUp() throws Exception {
041: super .setUp();
042: ejbTestModule = createEJBTestModule(getEJBMockObjectFactory());
043: }
044:
045: /**
046: * Gets the {@link com.mockrunner.ejb.EJBTestModule}.
047: * @return the {@link com.mockrunner.ejb.EJBTestModule}
048: */
049: protected EJBTestModule getEJBTestModule() {
050: return ejbTestModule;
051: }
052:
053: /**
054: * Sets the {@link com.mockrunner.ejb.EJBTestModule}.
055: * @param ejbTestModule the {@link com.mockrunner.ejb.EJBTestModule}
056: */
057: protected void setEJBTestModule(EJBTestModule ejbTestModule) {
058: this .ejbTestModule = ejbTestModule;
059: }
060:
061: /**
062: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#setImplementationSuffix(String)}
063: */
064: protected void setImplementationSuffix(String impSuffix) {
065: ejbTestModule.setImplementationSuffix(impSuffix);
066: }
067:
068: /**
069: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#setBusinessInterfaceSuffix(String)}
070: */
071: protected void setBusinessInterfaceSuffix(
072: String businessInterfaceSuffix) {
073: ejbTestModule
074: .setBusinessInterfaceSuffix(businessInterfaceSuffix);
075: }
076:
077: /**
078: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#setHomeInterfaceSuffix(String)}
079: */
080: protected void setHomeInterfaceSuffix(String homeInterfaceSuffix) {
081: ejbTestModule.setHomeInterfaceSuffix(homeInterfaceSuffix);
082: }
083:
084: /**
085: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#setInterfacePackage(String)}
086: */
087: protected void setInterfacePackage(String interfacePackage) {
088: ejbTestModule.setInterfacePackage(interfacePackage);
089: }
090:
091: /**
092: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#setHomeInterfacePackage(String)}
093: */
094: protected void setHomeInterfacePackage(String homeInterfacePackage) {
095: ejbTestModule.setHomeInterfacePackage(homeInterfacePackage);
096: }
097:
098: /**
099: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#setBusinessInterfacePackage(String)}
100: */
101: protected void setBusinessInterfacePackage(
102: String businessInterfacePackage) {
103: ejbTestModule
104: .setBusinessInterfacePackage(businessInterfacePackage);
105: }
106:
107: /**
108: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploy(BasicEjbDescriptor)}
109: */
110: protected void deploy(BasicEjbDescriptor descriptor) {
111: ejbTestModule.deploy(descriptor);
112: }
113:
114: /**
115: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploy(BasicEjbDescriptor, TransactionPolicy)}
116: */
117: protected void deploy(BasicEjbDescriptor descriptor,
118: TransactionPolicy policy) {
119: ejbTestModule.deploy(descriptor, policy);
120: }
121:
122: /**
123: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Class, TransactionPolicy)}
124: */
125: protected void deploySessionBean(String jndiName, Class beanClass,
126: TransactionPolicy policy) {
127: ejbTestModule.deploySessionBean(jndiName, beanClass, policy);
128: }
129:
130: /**
131: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Class)}
132: */
133: protected void deploySessionBean(String jndiName, Class beanClass) {
134: ejbTestModule.deploySessionBean(jndiName, beanClass);
135: }
136:
137: /**
138: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Class, boolean)}
139: */
140: protected void deploySessionBean(String jndiName, Class beanClass,
141: boolean stateful) {
142: ejbTestModule.deploySessionBean(jndiName, beanClass, stateful);
143: }
144:
145: /**
146: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Object, TransactionPolicy)}
147: */
148: protected void deploySessionBean(String jndiName, Object bean,
149: TransactionPolicy policy) {
150: ejbTestModule.deploySessionBean(jndiName, bean, policy);
151: }
152:
153: /**
154: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Class, boolean, TransactionPolicy)}
155: */
156: protected void deploySessionBean(String jndiName, Class beanClass,
157: boolean stateful, TransactionPolicy policy) {
158: ejbTestModule.deploySessionBean(jndiName, beanClass, stateful,
159: policy);
160: }
161:
162: /**
163: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Object)}
164: */
165: protected void deploySessionBean(String jndiName, Object bean) {
166: ejbTestModule.deploySessionBean(jndiName, bean);
167: }
168:
169: /**
170: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Object, boolean)}
171: */
172: protected void deploySessionBean(String jndiName, Object bean,
173: boolean stateful) {
174: ejbTestModule.deploySessionBean(jndiName, bean, stateful);
175: }
176:
177: /**
178: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deploySessionBean(String, Object, boolean, TransactionPolicy)}
179: */
180: protected void deploySessionBean(String jndiName, Object bean,
181: boolean stateful, TransactionPolicy policy) {
182: ejbTestModule.deploySessionBean(jndiName, bean, stateful,
183: policy);
184: }
185:
186: /**
187: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deployEntityBean(String, Class, TransactionPolicy)}
188: */
189: protected void deployEntityBean(String jndiName, Class beanClass,
190: TransactionPolicy policy) {
191: ejbTestModule.deployEntityBean(jndiName, beanClass, policy);
192: }
193:
194: /**
195: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deployEntityBean(String, Class)}
196: */
197: protected void deployEntityBean(String jndiName, Class beanClass) {
198: ejbTestModule.deployEntityBean(jndiName, beanClass);
199: }
200:
201: /**
202: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deployMessageBean(String, String, ConnectionFactory, Destination, Object, TransactionPolicy)}
203: */
204: protected void deployMessageBean(String connectionFactoryJndiName,
205: String destinationJndiName,
206: ConnectionFactory connectionFactory,
207: Destination destination, Object bean,
208: TransactionPolicy policy) {
209: ejbTestModule.deployMessageBean(connectionFactoryJndiName,
210: destinationJndiName, connectionFactory, destination,
211: bean, policy);
212: }
213:
214: /**
215: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#deployMessageBean(String, String, ConnectionFactory, Destination, Object)}
216: */
217: protected void deployMessageBean(String connectionFactoryJndiName,
218: String destinationJndiName,
219: ConnectionFactory connectionFactory,
220: Destination destination, Object bean) {
221: ejbTestModule.deployMessageBean(connectionFactoryJndiName,
222: destinationJndiName, connectionFactory, destination,
223: bean);
224: }
225:
226: /**
227: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#bindToContext(String, Object)}
228: */
229: protected void bindToContext(String name, Object object) {
230: ejbTestModule.bindToContext(name, object);
231: }
232:
233: /**
234: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#lookupBean(String)}
235: * @deprecated
236: */
237: protected Object lookupBean(String name) {
238: return ejbTestModule.lookupBean(name);
239: }
240:
241: /**
242: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#lookupBean(String, String, Object[])}
243: * @deprecated
244: */
245: protected Object lookupBean(String name, String createMethod,
246: Object[] parameters) {
247: return ejbTestModule.lookupBean(name, createMethod, parameters);
248: }
249:
250: /**
251: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#lookupBean(String, Object[])}
252: * @deprecated
253: */
254: protected Object lookupBean(String name, Object[] parameters) {
255: return ejbTestModule.lookupBean(name, parameters);
256: }
257:
258: /**
259: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createBean(String)}
260: */
261: protected Object createBean(String name) {
262: return ejbTestModule.createBean(name);
263: }
264:
265: /**
266: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createBean(String, String, Object[])}
267: */
268: protected Object createBean(String name, String createMethod,
269: Object[] parameters) {
270: return ejbTestModule.createBean(name, createMethod, parameters);
271: }
272:
273: /**
274: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createBean(String, String, Object[], Class[])}
275: */
276: protected Object createBean(String name, String createMethod,
277: Object[] parameters, Class[] parameterTypes) {
278: return ejbTestModule.createBean(name, createMethod, parameters,
279: parameterTypes);
280: }
281:
282: /**
283: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createBean(String, Object[])}
284: */
285: protected Object createBean(String name, Object[] parameters) {
286: return ejbTestModule.createBean(name, parameters);
287: }
288:
289: /**
290: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createEntityBean(String, String, Object[], Class[], Object)}
291: */
292: protected Object createEntityBean(String name, String createMethod,
293: Object[] parameters, Class[] parameterTypes,
294: Object primaryKey) {
295: return ejbTestModule.createEntityBean(name, createMethod,
296: parameters, parameterTypes, primaryKey);
297: }
298:
299: /**
300: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createEntityBean(String, String, Object[], Object)}
301: */
302: protected Object createEntityBean(String name, String createMethod,
303: Object[] parameters, Object primaryKey) {
304: return ejbTestModule.createEntityBean(name, createMethod,
305: parameters, primaryKey);
306: }
307:
308: /**
309: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createEntityBean(String, Object)}
310: */
311: protected Object createEntityBean(String name, Object primaryKey) {
312: return ejbTestModule.createEntityBean(name, primaryKey);
313: }
314:
315: /**
316: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#createEntityBean(String, Object[], Object)}
317: */
318: protected Object createEntityBean(String name, Object[] parameters,
319: Object primaryKey) {
320: return ejbTestModule.createEntityBean(name, parameters,
321: primaryKey);
322: }
323:
324: /**
325: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#findByPrimaryKey(String, Object)}
326: */
327: protected Object findByPrimaryKey(String name, Object primaryKey) {
328: return ejbTestModule.findByPrimaryKey(name, primaryKey);
329: }
330:
331: /**
332: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#resetUserTransaction}
333: */
334: protected void resetUserTransaction() {
335: ejbTestModule.resetUserTransaction();
336: }
337:
338: /**
339: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#verifyCommitted}
340: */
341: protected void verifyCommitted() {
342: ejbTestModule.verifyCommitted();
343: }
344:
345: /**
346: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#verifyNotCommitted}
347: */
348: protected void verifyNotCommitted() {
349: ejbTestModule.verifyNotCommitted();
350: }
351:
352: /**
353: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#verifyRolledBack}
354: */
355: protected void verifyRolledBack() {
356: ejbTestModule.verifyRolledBack();
357: }
358:
359: /**
360: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#verifyNotRolledBack}
361: */
362: protected void verifyNotRolledBack() {
363: ejbTestModule.verifyNotRolledBack();
364: }
365:
366: /**
367: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#verifyMarkedForRollback}
368: */
369: protected void verifyMarkedForRollback() {
370: ejbTestModule.verifyMarkedForRollback();
371: }
372:
373: /**
374: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#verifyNotMarkedForRollback}
375: */
376: protected void verifyNotMarkedForRollback() {
377: ejbTestModule.verifyNotMarkedForRollback();
378: }
379:
380: /**
381: * Delegates to {@link com.mockrunner.ejb.EJBTestModule#lookup(String)}
382: */
383: protected Object lookup(String name) {
384: return ejbTestModule.lookup(name);
385: }
386: }
|