com.mockrunner.tag
Class BasicTagTestCaseAdapter

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.mockrunner.base.BasicWebTestCase
              extended by com.mockrunner.base.BasicHTMLOutputTestCase
                  extended by com.mockrunner.tag.BasicTagTestCaseAdapter
All Implemented Interfaces:
junit.framework.Test

public abstract class BasicTagTestCaseAdapter
extends BasicHTMLOutputTestCase

Delegator for TagTestModule. You can subclass this adapter or use TagTestModule directly (so your test case can use another base class). This basic adapter can be used if you don't need any other modules. It does not extend BaseTestCase. If you want to use several modules in conjunction, consider subclassing TagTestCaseAdapter. This class is generated from the TagTestModule and should not be edited directly.


Constructor Summary
BasicTagTestCaseAdapter()
           
BasicTagTestCaseAdapter(java.lang.String name)
           
 
Method Summary
protected  void clearOutput()
          Delegates to TagTestModule.clearOutput()
protected  NestedTag createNestedTag(java.lang.Class tagClass)
          Delegates to TagTestModule.createNestedTag(Class)
protected  NestedTag createNestedTag(java.lang.Class tagClass, java.util.Map attributes)
          Delegates to TagTestModule.createNestedTag(Class, Map)
protected  javax.servlet.jsp.tagext.TagSupport createTag(java.lang.Class tagClass)
          Delegates to TagTestModule.createTag(Class)
protected  javax.servlet.jsp.tagext.TagSupport createTag(java.lang.Class tagClass, java.util.Map attributes)
          Delegates to TagTestModule.createTag(Class, Map)
protected  TagTestModule createTagTestModule()
          Creates a TagTestModule based on the current WebMockObjectFactory.
protected  TagTestModule createTagTestModule(WebMockObjectFactory mockFactory)
          Creates a TagTestModule with the specified WebMockObjectFactory.
protected  WebMockObjectFactory createWebMockObjectFactory()
          Creates a WebMockObjectFactory.
protected  WebMockObjectFactory createWebMockObjectFactory(WebMockObjectFactory otherFactory)
          Same as createWebMockObjectFactory(otherFactory, true).
protected  WebMockObjectFactory createWebMockObjectFactory(WebMockObjectFactory otherFactory, boolean createNewSession)
          Creates a WebMockObjectFactory based on another WebMockObjectFactory.
protected  javax.servlet.jsp.tagext.JspTag createWrappedTag(java.lang.Class tagClass)
          Delegates to TagTestModule.createWrappedTag(Class)
protected  javax.servlet.jsp.tagext.JspTag createWrappedTag(java.lang.Class tagClass, java.util.Map attributes)
          Delegates to TagTestModule.createWrappedTag(Class, Map)
protected  int doAfterBody()
          Delegates to TagTestModule.doAfterBody()
protected  int doEndTag()
          Delegates to TagTestModule.doEndTag()
protected  void doInitBody()
          Delegates to TagTestModule.doInitBody()
protected  int doStartTag()
          Delegates to TagTestModule.doStartTag()
protected  void doTag()
          Delegates to TagTestModule.doTag()
protected  HTMLOutputModule getHTMLOutputModule()
          Returns the TagTestModule as HTMLOutputModule.
protected  MockPageContext getMockPageContext()
          Delegates to TagTestModule.getMockPageContext()
protected  NestedTag getNestedTag()
          Delegates to TagTestModule.getNestedTag()
protected  javax.servlet.jsp.tagext.TagSupport getTag()
          Delegates to TagTestModule.getTag()
protected  TagTestModule getTagTestModule()
          Gets the TagTestModule.
protected  WebMockObjectFactory getWebMockObjectFactory()
          Gets the WebMockObjectFactory.
protected  javax.servlet.jsp.tagext.JspTag getWrappedTag()
          Delegates to TagTestModule.getWrappedTag()
protected  void populateAttributes()
          Delegates to TagTestModule.populateAttributes()
protected  int processTagLifecycle()
          Delegates to TagTestModule.processTagLifecycle()
protected  void release()
          Delegates to TagTestModule.release()
protected  void setBody(java.lang.String body)
          Delegates to TagTestModule.setBody(String)
protected  void setDoRelease(boolean doRelease)
          Delegates to TagTestModule.setDoRelease(boolean)
protected  void setDoReleaseRecursive(boolean doRelease)
          Delegates to TagTestModule.setDoReleaseRecursive(boolean)
protected  NestedTag setTag(javax.servlet.jsp.tagext.JspTag tag)
          Delegates to TagTestModule.setTag(JspTag)
protected  NestedTag setTag(javax.servlet.jsp.tagext.JspTag tag, java.util.Map attributes)
          Delegates to TagTestModule.setTag(JspTag, Map)
protected  NestedTag setTag(javax.servlet.jsp.tagext.TagSupport tag)
          Delegates to TagTestModule.setTag(TagSupport)
protected  NestedTag setTag(javax.servlet.jsp.tagext.TagSupport tag, java.util.Map attributes)
          Delegates to TagTestModule.setTag(TagSupport, Map)
protected  void setTagTestModule(TagTestModule tagTestModule)
          Sets the TagTestModule.
protected  void setUp()
          Creates the TagTestModule.
protected  void setWebMockObjectFactory(WebMockObjectFactory webMockObjectFactory)
          Sets the WebMockObjectFactory.
protected  void tearDown()
           
 
Methods inherited from class com.mockrunner.base.BasicHTMLOutputTestCase
getOutput, getOutputAsBufferedReader, getOutputAsJDOMDocument, getOutputAsW3CDocument, getOutputAsWellformedXML, getWebTestModule, setCaseSensitive, verifyOutput, verifyOutputContains, verifyOutputRegularExpression
 
Methods inherited from class com.mockrunner.base.BasicWebTestCase
addRequestParameter, addRequestParameter, addRequestParameter, getRequestAttribute, getRequestParameter, getSessionAttribute, setRequestAttribute, setSessionAttribute
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicTagTestCaseAdapter

public BasicTagTestCaseAdapter()

BasicTagTestCaseAdapter

public BasicTagTestCaseAdapter(java.lang.String name)
Method Detail

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Creates the TagTestModule. If you overwrite this method, you must call super.setUp().

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

createWebMockObjectFactory

protected WebMockObjectFactory createWebMockObjectFactory()
Creates a WebMockObjectFactory.

Returns:
the created WebMockObjectFactory

createWebMockObjectFactory

protected WebMockObjectFactory createWebMockObjectFactory(WebMockObjectFactory otherFactory)
Same as createWebMockObjectFactory(otherFactory, true).


createWebMockObjectFactory

protected WebMockObjectFactory createWebMockObjectFactory(WebMockObjectFactory otherFactory,
                                                          boolean createNewSession)
Creates a WebMockObjectFactory based on another WebMockObjectFactory. The created WebMockObjectFactory will have its own request and response objects. If you set createNewSession to true it will also have its own session object. The two factories will share one ServletContext. Especially important for multithreading tests. If you set createNewSession to false, the two factories will share one session. This setting simulates multiple requests from the same client.

Parameters:
otherFactory - the other factory
createNewSession - create a new session for the new factory
Returns:
the created WebMockObjectFactory

getWebMockObjectFactory

protected WebMockObjectFactory getWebMockObjectFactory()
Gets the WebMockObjectFactory.

Returns:
the WebMockObjectFactory

setWebMockObjectFactory

protected void setWebMockObjectFactory(WebMockObjectFactory webMockObjectFactory)
Sets the WebMockObjectFactory.

Parameters:
webMockObjectFactory - the WebMockObjectFactory

createTagTestModule

protected TagTestModule createTagTestModule()
Creates a TagTestModule based on the current WebMockObjectFactory. Same as createTagTestModule(getWebMockObjectFactory()).

Returns:
the created TagTestModule

createTagTestModule

protected TagTestModule createTagTestModule(WebMockObjectFactory mockFactory)
Creates a TagTestModule with the specified WebMockObjectFactory.

Returns:
the created TagTestModule

getHTMLOutputModule

protected HTMLOutputModule getHTMLOutputModule()
Returns the TagTestModule as HTMLOutputModule.

Specified by:
getHTMLOutputModule in class BasicHTMLOutputTestCase
Returns:
the HTMLOutputModule

getTagTestModule

protected TagTestModule getTagTestModule()
Gets the TagTestModule.

Returns:
the TagTestModule

setTagTestModule

protected void setTagTestModule(TagTestModule tagTestModule)
Sets the TagTestModule.

Parameters:
tagTestModule - the TagTestModule

getMockPageContext

protected MockPageContext getMockPageContext()
Delegates to TagTestModule.getMockPageContext()


clearOutput

protected void clearOutput()
Delegates to TagTestModule.clearOutput()


createNestedTag

protected NestedTag createNestedTag(java.lang.Class tagClass,
                                    java.util.Map attributes)
Delegates to TagTestModule.createNestedTag(Class, Map)


createNestedTag

protected NestedTag createNestedTag(java.lang.Class tagClass)
Delegates to TagTestModule.createNestedTag(Class)


createWrappedTag

protected javax.servlet.jsp.tagext.JspTag createWrappedTag(java.lang.Class tagClass)
Delegates to TagTestModule.createWrappedTag(Class)


createWrappedTag

protected javax.servlet.jsp.tagext.JspTag createWrappedTag(java.lang.Class tagClass,
                                                           java.util.Map attributes)
Delegates to TagTestModule.createWrappedTag(Class, Map)


getWrappedTag

protected javax.servlet.jsp.tagext.JspTag getWrappedTag()
Delegates to TagTestModule.getWrappedTag()


setTag

protected NestedTag setTag(javax.servlet.jsp.tagext.JspTag tag)
Delegates to TagTestModule.setTag(JspTag)


setTag

protected NestedTag setTag(javax.servlet.jsp.tagext.JspTag tag,
                           java.util.Map attributes)
Delegates to TagTestModule.setTag(JspTag, Map)


setTag

protected NestedTag setTag(javax.servlet.jsp.tagext.TagSupport tag,
                           java.util.Map attributes)
Delegates to TagTestModule.setTag(TagSupport, Map)


setTag

protected NestedTag setTag(javax.servlet.jsp.tagext.TagSupport tag)
Delegates to TagTestModule.setTag(TagSupport)


setDoRelease

protected void setDoRelease(boolean doRelease)
Delegates to TagTestModule.setDoRelease(boolean)


setDoReleaseRecursive

protected void setDoReleaseRecursive(boolean doRelease)
Delegates to TagTestModule.setDoReleaseRecursive(boolean)


populateAttributes

protected void populateAttributes()
Delegates to TagTestModule.populateAttributes()


setBody

protected void setBody(java.lang.String body)
Delegates to TagTestModule.setBody(String)


getNestedTag

protected NestedTag getNestedTag()
Delegates to TagTestModule.getNestedTag()


doTag

protected void doTag()
Delegates to TagTestModule.doTag()


doStartTag

protected int doStartTag()
Delegates to TagTestModule.doStartTag()


doEndTag

protected int doEndTag()
Delegates to TagTestModule.doEndTag()


doInitBody

protected void doInitBody()
Delegates to TagTestModule.doInitBody()


doAfterBody

protected int doAfterBody()
Delegates to TagTestModule.doAfterBody()


processTagLifecycle

protected int processTagLifecycle()
Delegates to TagTestModule.processTagLifecycle()


release

protected void release()
Delegates to TagTestModule.release()


createTag

protected javax.servlet.jsp.tagext.TagSupport createTag(java.lang.Class tagClass)
Delegates to TagTestModule.createTag(Class)


createTag

protected javax.servlet.jsp.tagext.TagSupport createTag(java.lang.Class tagClass,
                                                        java.util.Map attributes)
Delegates to TagTestModule.createTag(Class, Map)


getTag

protected javax.servlet.jsp.tagext.TagSupport getTag()
Delegates to TagTestModule.getTag()