001 package com.mockrunner.tag;
002
003 import java.util.Map;
004
005 import javax.servlet.jsp.tagext.JspTag;
006 import javax.servlet.jsp.tagext.TagSupport;
007
008 import com.mockrunner.base.HTMLOutputModule;
009 import com.mockrunner.base.HTMLOutputTestCase;
010 import com.mockrunner.mock.web.MockPageContext;
011
012 /**
013 * Delegator for {@link com.mockrunner.tag.TagTestModule}. You can
014 * subclass this adapter or use {@link com.mockrunner.tag.TagTestModule}
015 * directly (so your test case can use another base class).
016 * This adapter extends {@link com.mockrunner.base.BaseTestCase}.
017 * It can be used if you want to use several modules in conjunction.
018 * <b>This class is generated from the {@link com.mockrunner.tag.TagTestModule}
019 * and should not be edited directly</b>.
020 */
021 public abstract class TagTestCaseAdapter extends HTMLOutputTestCase
022 {
023 private TagTestModule tagTestModule;
024
025 public TagTestCaseAdapter()
026 {
027
028 }
029
030 public TagTestCaseAdapter(String name)
031 {
032 super(name);
033 }
034
035 protected void tearDown() throws Exception
036 {
037 super.tearDown();
038 tagTestModule = null;
039 }
040
041 /**
042 * Creates the {@link com.mockrunner.tag.TagTestModule}. If you
043 * overwrite this method, you must call <code>super.setUp()</code>.
044 */
045 protected void setUp() throws Exception
046 {
047 super.setUp();
048 tagTestModule = createTagTestModule(getWebMockObjectFactory());
049 }
050
051 /**
052 * Returns the {@link com.mockrunner.tag.TagTestModule} as
053 * {@link com.mockrunner.base.HTMLOutputModule}.
054 * @return the {@link com.mockrunner.base.HTMLOutputModule}
055 */
056 protected HTMLOutputModule getHTMLOutputModule()
057 {
058 return tagTestModule;
059 }
060
061 /**
062 * Gets the {@link com.mockrunner.tag.TagTestModule}.
063 * @return the {@link com.mockrunner.tag.TagTestModule}
064 */
065 protected TagTestModule getTagTestModule()
066 {
067 return tagTestModule;
068 }
069
070 /**
071 * Sets the {@link com.mockrunner.tag.TagTestModule}.
072 * @param tagTestModule the {@link com.mockrunner.tag.TagTestModule}
073 */
074 protected void setTagTestModule(TagTestModule tagTestModule)
075 {
076 this.tagTestModule = tagTestModule;
077 }
078
079 /**
080 * Delegates to {@link com.mockrunner.tag.TagTestModule#getMockPageContext}
081 */
082 protected MockPageContext getMockPageContext()
083 {
084 return tagTestModule.getMockPageContext();
085 }
086
087 /**
088 * Delegates to {@link com.mockrunner.tag.TagTestModule#clearOutput}
089 */
090 protected void clearOutput()
091 {
092 tagTestModule.clearOutput();
093 }
094
095 /**
096 * Delegates to {@link com.mockrunner.tag.TagTestModule#createNestedTag(Class, Map)}
097 */
098 protected NestedTag createNestedTag(Class tagClass, Map attributes)
099 {
100 return tagTestModule.createNestedTag(tagClass, attributes);
101 }
102
103 /**
104 * Delegates to {@link com.mockrunner.tag.TagTestModule#createNestedTag(Class)}
105 */
106 protected NestedTag createNestedTag(Class tagClass)
107 {
108 return tagTestModule.createNestedTag(tagClass);
109 }
110
111 /**
112 * Delegates to {@link com.mockrunner.tag.TagTestModule#createWrappedTag(Class)}
113 */
114 protected JspTag createWrappedTag(Class tagClass)
115 {
116 return tagTestModule.createWrappedTag(tagClass);
117 }
118
119 /**
120 * Delegates to {@link com.mockrunner.tag.TagTestModule#createWrappedTag(Class, Map)}
121 */
122 protected JspTag createWrappedTag(Class tagClass, Map attributes)
123 {
124 return tagTestModule.createWrappedTag(tagClass, attributes);
125 }
126
127 /**
128 * Delegates to {@link com.mockrunner.tag.TagTestModule#getWrappedTag}
129 */
130 protected JspTag getWrappedTag()
131 {
132 return tagTestModule.getWrappedTag();
133 }
134
135 /**
136 * Delegates to {@link com.mockrunner.tag.TagTestModule#setTag(JspTag)}
137 */
138 protected NestedTag setTag(JspTag tag)
139 {
140 return tagTestModule.setTag(tag);
141 }
142
143 /**
144 * Delegates to {@link com.mockrunner.tag.TagTestModule#setTag(JspTag, Map)}
145 */
146 protected NestedTag setTag(JspTag tag, Map attributes)
147 {
148 return tagTestModule.setTag(tag, attributes);
149 }
150
151 /**
152 * Delegates to {@link com.mockrunner.tag.TagTestModule#setTag(TagSupport, Map)}
153 */
154 protected NestedTag setTag(TagSupport tag, Map attributes)
155 {
156 return tagTestModule.setTag(tag, attributes);
157 }
158
159 /**
160 * Delegates to {@link com.mockrunner.tag.TagTestModule#setTag(TagSupport)}
161 */
162 protected NestedTag setTag(TagSupport tag)
163 {
164 return tagTestModule.setTag(tag);
165 }
166
167 /**
168 * Delegates to {@link com.mockrunner.tag.TagTestModule#setDoRelease(boolean)}
169 */
170 protected void setDoRelease(boolean doRelease)
171 {
172 tagTestModule.setDoRelease(doRelease);
173 }
174
175 /**
176 * Delegates to {@link com.mockrunner.tag.TagTestModule#setDoReleaseRecursive(boolean)}
177 */
178 protected void setDoReleaseRecursive(boolean doRelease)
179 {
180 tagTestModule.setDoReleaseRecursive(doRelease);
181 }
182
183 /**
184 * Delegates to {@link com.mockrunner.tag.TagTestModule#populateAttributes}
185 */
186 protected void populateAttributes()
187 {
188 tagTestModule.populateAttributes();
189 }
190
191 /**
192 * Delegates to {@link com.mockrunner.tag.TagTestModule#setBody(String)}
193 */
194 protected void setBody(String body)
195 {
196 tagTestModule.setBody(body);
197 }
198
199 /**
200 * Delegates to {@link com.mockrunner.tag.TagTestModule#getNestedTag}
201 */
202 protected NestedTag getNestedTag()
203 {
204 return tagTestModule.getNestedTag();
205 }
206
207 /**
208 * Delegates to {@link com.mockrunner.tag.TagTestModule#doTag}
209 */
210 protected void doTag()
211 {
212 tagTestModule.doTag();
213 }
214
215 /**
216 * Delegates to {@link com.mockrunner.tag.TagTestModule#doStartTag}
217 */
218 protected int doStartTag()
219 {
220 return tagTestModule.doStartTag();
221 }
222
223 /**
224 * Delegates to {@link com.mockrunner.tag.TagTestModule#doEndTag}
225 */
226 protected int doEndTag()
227 {
228 return tagTestModule.doEndTag();
229 }
230
231 /**
232 * Delegates to {@link com.mockrunner.tag.TagTestModule#doInitBody}
233 */
234 protected void doInitBody()
235 {
236 tagTestModule.doInitBody();
237 }
238
239 /**
240 * Delegates to {@link com.mockrunner.tag.TagTestModule#doAfterBody}
241 */
242 protected int doAfterBody()
243 {
244 return tagTestModule.doAfterBody();
245 }
246
247 /**
248 * Delegates to {@link com.mockrunner.tag.TagTestModule#processTagLifecycle}
249 */
250 protected int processTagLifecycle()
251 {
252 return tagTestModule.processTagLifecycle();
253 }
254
255 /**
256 * Delegates to {@link com.mockrunner.tag.TagTestModule#release}
257 */
258 protected void release()
259 {
260 tagTestModule.release();
261 }
262
263 /**
264 * Delegates to {@link com.mockrunner.tag.TagTestModule#createTag(Class)}
265 */
266 protected TagSupport createTag(Class tagClass)
267 {
268 return tagTestModule.createTag(tagClass);
269 }
270
271 /**
272 * Delegates to {@link com.mockrunner.tag.TagTestModule#createTag(Class, Map)}
273 */
274 protected TagSupport createTag(Class tagClass, Map attributes)
275 {
276 return tagTestModule.createTag(tagClass, attributes);
277 }
278
279 /**
280 * Delegates to {@link com.mockrunner.tag.TagTestModule#getTag}
281 */
282 protected TagSupport getTag()
283 {
284 return tagTestModule.getTag();
285 }
286 }