001: package com.mockrunner.connector;
002:
003: import java.util.List;
004:
005: import com.mockrunner.base.BaseTestCase;
006:
007: /**
008: * Delegator for {@link com.mockrunner.connector.ConnectorTestModule}. You can
009: * subclass this adapter or use {@link com.mockrunner.connector.ConnectorTestModule}
010: * directly (so your test case can use another base class).
011: * This adapter extends {@link com.mockrunner.base.BaseTestCase}.
012: * It can be used if you want to use several modules in conjunction.
013: * <b>This class is generated from the {@link com.mockrunner.connector.ConnectorTestModule}
014: * and should not be edited directly</b>.
015: */
016: public abstract class ConnectorTestCaseAdapter extends BaseTestCase {
017: private ConnectorTestModule connectorTestModule;
018:
019: public ConnectorTestCaseAdapter() {
020:
021: }
022:
023: public ConnectorTestCaseAdapter(String name) {
024: super (name);
025: }
026:
027: protected void tearDown() throws Exception {
028: super .tearDown();
029: connectorTestModule = null;
030: }
031:
032: /**
033: * Creates the {@link com.mockrunner.connector.ConnectorTestModule}. If you
034: * overwrite this method, you must call <code>super.setUp()</code>.
035: */
036: protected void setUp() throws Exception {
037: super .setUp();
038: connectorTestModule = createConnectorTestModule(getConnectorMockObjectFactory());
039: }
040:
041: /**
042: * Gets the {@link com.mockrunner.connector.ConnectorTestModule}.
043: * @return the {@link com.mockrunner.connector.ConnectorTestModule}
044: */
045: protected ConnectorTestModule getConnectorTestModule() {
046: return connectorTestModule;
047: }
048:
049: /**
050: * Sets the {@link com.mockrunner.connector.ConnectorTestModule}.
051: * @param connectorTestModule the {@link com.mockrunner.connector.ConnectorTestModule}
052: */
053: protected void setConnectorTestModule(
054: ConnectorTestModule connectorTestModule) {
055: this .connectorTestModule = connectorTestModule;
056: }
057:
058: /**
059: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyConnectionClosed}
060: */
061: protected void verifyConnectionClosed() {
062: connectorTestModule.verifyConnectionClosed();
063: }
064:
065: /**
066: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getInteractionHandler}
067: */
068: protected InteractionHandler getInteractionHandler() {
069: return connectorTestModule.getInteractionHandler();
070: }
071:
072: /**
073: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getInteractionList}
074: */
075: protected List getInteractionList() {
076: return connectorTestModule.getInteractionList();
077: }
078:
079: /**
080: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedIndexedRecords(String)}
081: */
082: protected List getCreatedIndexedRecords(String recordName) {
083: return connectorTestModule.getCreatedIndexedRecords(recordName);
084: }
085:
086: /**
087: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedIndexedRecords}
088: */
089: protected List getCreatedIndexedRecords() {
090: return connectorTestModule.getCreatedIndexedRecords();
091: }
092:
093: /**
094: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedMappedRecords(String)}
095: */
096: protected List getCreatedMappedRecords(String recordName) {
097: return connectorTestModule.getCreatedMappedRecords(recordName);
098: }
099:
100: /**
101: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#getCreatedMappedRecords}
102: */
103: protected List getCreatedMappedRecords() {
104: return connectorTestModule.getCreatedMappedRecords();
105: }
106:
107: /**
108: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyAllInteractionsClosed}
109: */
110: protected void verifyAllInteractionsClosed() {
111: connectorTestModule.verifyAllInteractionsClosed();
112: }
113:
114: /**
115: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyInteractionClosed(int)}
116: */
117: protected void verifyInteractionClosed(int index) {
118: connectorTestModule.verifyInteractionClosed(index);
119: }
120:
121: /**
122: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedIndexedRecords(int)}
123: */
124: protected void verifyNumberCreatedIndexedRecords(int expected) {
125: connectorTestModule.verifyNumberCreatedIndexedRecords(expected);
126: }
127:
128: /**
129: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedIndexedRecords(String, int)}
130: */
131: protected void verifyNumberCreatedIndexedRecords(String recordName,
132: int expected) {
133: connectorTestModule.verifyNumberCreatedIndexedRecords(
134: recordName, expected);
135: }
136:
137: /**
138: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedMappedRecords(int)}
139: */
140: protected void verifyNumberCreatedMappedRecords(int expected) {
141: connectorTestModule.verifyNumberCreatedMappedRecords(expected);
142: }
143:
144: /**
145: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyNumberCreatedMappedRecords(String, int)}
146: */
147: protected void verifyNumberCreatedMappedRecords(String recordName,
148: int expected) {
149: connectorTestModule.verifyNumberCreatedMappedRecords(
150: recordName, expected);
151: }
152:
153: /**
154: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionCommitted}
155: */
156: protected void verifyLocalTransactionCommitted() {
157: connectorTestModule.verifyLocalTransactionCommitted();
158: }
159:
160: /**
161: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionNotCommitted}
162: */
163: protected void verifyLocalTransactionNotCommitted() {
164: connectorTestModule.verifyLocalTransactionNotCommitted();
165: }
166:
167: /**
168: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionRolledBack}
169: */
170: protected void verifyLocalTransactionRolledBack() {
171: connectorTestModule.verifyLocalTransactionRolledBack();
172: }
173:
174: /**
175: * Delegates to {@link com.mockrunner.connector.ConnectorTestModule#verifyLocalTransactionNotRolledBack}
176: */
177: protected void verifyLocalTransactionNotRolledBack() {
178: connectorTestModule.verifyLocalTransactionNotRolledBack();
179: }
180: }
|