Java Doc for TagTestModule.java in  » Testing » mockrunner-0.4 » com » mockrunner » tag » 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.tag 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.mockrunner.base.HTMLOutputModule
   com.mockrunner.tag.TagTestModule

TagTestModule
public class TagTestModule extends HTMLOutputModule (Code)
Module for custom tag tests. Simulates the container by performing the tag lifecycle.



Constructor Summary
public  TagTestModule(WebMockObjectFactory mockFactory)
    

Method Summary
public  voidclearOutput()
     Resets the output buffer.
public  NestedTagcreateNestedTag(Class tagClass)
     Creates a NestedTag and returns it.
public  NestedTagcreateNestedTag(Class tagClass, Map attributes)
     Creates a NestedTag and returns it.
public  TagSupportcreateTag(Class tagClass)
     Creates a tag.
public  TagSupportcreateTag(Class tagClass, Map attributes)
     Creates a tag.
public  intdoAfterBody()
     Calls the doAfterBody method of the current tag.
public  intdoEndTag()
     Calls the doEndTag method of the current tag.
public  voiddoInitBody()
     Calls the doInitBody method of the current tag.
public  intdoStartTag()
     Calls the doStartTag method of the current tag.
public  MockPageContextgetMockPageContext()
     Returns the MockPageContext object.
public  NestedTaggetNestedTag()
     Returns the current nested tag.
public  StringgetOutput()
     Gets the output data the current tag has rendered.
public  TagSupportgetTag()
     Returns the current wrapped tag.
public  voidpopulateAttributes()
     Populates the attributes of the underlying tag by calling NestedTag.populateAttributes .
public  intprocessTagLifecycle()
     Performs the tags lifecycle by calling NestedTag.doLifecycle . All doBody and doTag methods are called as in the real web container.
public  voidrelease()
     Calls the release method of the current tag.
public  voidsetBody(String body)
     Sets the body of the tag as a static string.
public  voidsetDoRelease(boolean doRelease)
     Specify if the release method should be called after processing the tag lifecycle.
public  voidsetDoReleaseRecursive(boolean doRelease)
     Specify if the release method should be called after processing the tag lifecycle.
public  NestedTagsetTag(TagSupport tag)
     Creates a NestedTag and returns it.
public  NestedTagsetTag(TagSupport tag, Map attributes)
     Creates a NestedTag and returns it.


Constructor Detail
TagTestModule
public TagTestModule(WebMockObjectFactory mockFactory)(Code)




Method Detail
clearOutput
public void clearOutput()(Code)
Resets the output buffer.



createNestedTag
public NestedTag createNestedTag(Class tagClass)(Code)
Creates a NestedTag and returns it. You can add child tags or body blocks to the NestedTag . Use TagTestModule.getTag to get the wrapped tag. An empty attribute Map will be used for the tag.
Parameters:
  tagClass - the class of the tag instance of NestedStandardTag, NestedBodyTag or NestedSimpleTag



createNestedTag
public NestedTag createNestedTag(Class tagClass, Map attributes)(Code)
Creates a NestedTag and returns it. You can add child tags or body blocks to the NestedTag . Use TagTestModule.getTag to get the wrapped tag. The attributes Map contains the attributes of this tag (propertyname maps to propertyvalue). The attributes are populated (i.e. the tags setters are called) during the lifecycle or with an explicit call of TagTestModule.populateAttributes .
Parameters:
  tagClass - the class of the tag
Parameters:
  attributes - the attribute map instance of NestedStandardTag, NestedBodyTag or NestedSimpleTag



createTag
public TagSupport createTag(Class tagClass)(Code)
Creates a tag. Internally a NestedTag is created but the wrapped tag is returned. If you simply want to test the output of the tag without nesting other tags, you do not have to care about the NestedTag , just use the returned instance. An empty attribute Map will be used for the tag.
Parameters:
  tagClass - the class of the tag instance of TagSupport or BodyTagSupport RuntimeException, if the created tagis not an instance of TagSupport



createTag
public TagSupport createTag(Class tagClass, Map attributes)(Code)
Creates a tag. Internally a NestedTag is created but the wrapped tag is returned. If you simply want to test the output of the tag without nesting other tags, you do not have to care about the NestedTag , just use the returned instance. The attributes Map contains the attributes of this tag (propertyname maps to propertyvalue). The attributes are populated (i.e. the tags setters are called) during the lifecycle or with an explicit call of TagTestModule.populateAttributes .
Parameters:
  tagClass - the class of the tag
Parameters:
  attributes - the attribute map instance of TagSupport or BodyTagSupport RuntimeException, if the created tagis not an instance of TagSupport



doAfterBody
public int doAfterBody()(Code)
Calls the doAfterBody method of the current tag. the result of doAfterBody RuntimeException, if the tagis a simple tag



doEndTag
public int doEndTag()(Code)
Calls the doEndTag method of the current tag. the result of doEndTag RuntimeException, if the tagis a simple tag



doInitBody
public void doInitBody()(Code)
Calls the doInitBody method of the current tag.
throws:
  RuntimeException - if the current tag is no body tag RuntimeException, if the tagis a simple tag



doStartTag
public int doStartTag()(Code)
Calls the doStartTag method of the current tag. the result of doStartTag RuntimeException, if the tagis a simple tag



getMockPageContext
public MockPageContext getMockPageContext()(Code)
Returns the MockPageContext object. Delegates to com.mockrunner.mock.web.WebMockObjectFactory.getMockPageContext . the MockPageContext



getNestedTag
public NestedTag getNestedTag()(Code)
Returns the current nested tag. You can add child tags or body blocks to the NestedTag . Use TagTestModule.getTag to get the wrapped tag. instance of NestedStandardTag or NestedBodyTag



getOutput
public String getOutput()(Code)
Gets the output data the current tag has rendered. Makes only sense after calling at least TagTestModule.doStartTag or TagTestModule.processTagLifecycle the output data



getTag
public TagSupport getTag()(Code)
Returns the current wrapped tag. instance of TagSupport or BodyTagSupport RuntimeException, if the wrapped tagis not an instance of TagSupport



populateAttributes
public void populateAttributes()(Code)
Populates the attributes of the underlying tag by calling NestedTag.populateAttributes . The setters of the tag are called. Please note that child tags are not populated. This is done during the lifecycle.



processTagLifecycle
public int processTagLifecycle()(Code)
Performs the tags lifecycle by calling NestedTag.doLifecycle . All doBody and doTag methods are called as in the real web container. The evaluation of the body is simulated by performing the lifecycle recursively for all childs of the NestedTag . the result of the final doEndTag call or -1 inthe case of a simple tag



release
public void release()(Code)
Calls the release method of the current tag. RuntimeException, if the tagis a simple tag



setBody
public void setBody(String body)(Code)
Sets the body of the tag as a static string. Please note that all childs of the underlying NestedTag are deleted and the static content is set. If you want to use nested tags, please use the method NestedTag.addTextChild to set static content.
Parameters:
  body - the static body content



setDoRelease
public void setDoRelease(boolean doRelease)(Code)
Specify if the release method should be called after processing the tag lifecycle. Delegates to NestedTag.setDoRelease Defaults to false. It's the container behaviour to call release, but it's usually not necessary in the tests, because the tag instances are not reused during a test run.
Parameters:
  doRelease - should release be called



setDoReleaseRecursive
public void setDoReleaseRecursive(boolean doRelease)(Code)
Specify if the release method should be called after processing the tag lifecycle. Delegates to NestedTag.setDoReleaseRecursive Defaults to false. It's the container behaviour to call release, but it's usually not necessary in the tests, because the tag instances are not reused during a test run.
Parameters:
  doRelease - should release be called



setTag
public NestedTag setTag(TagSupport tag)(Code)
Creates a NestedTag and returns it. You can add child tags or body blocks to the NestedTag . Use TagTestModule.getTag to get the wrapped tag. An empty attribute Map will be used for the tag.
Parameters:
  tag - the tag instance of NestedStandardTag or NestedBodyTag



setTag
public NestedTag setTag(TagSupport tag, Map attributes)(Code)
Creates a NestedTag and returns it. You can add child tags or body blocks to the NestedTag . Use TagTestModule.getTag to get the wrapped tag. The attributes Map contains the attributes of this tag (propertyname maps to propertyvalue). The attributes are populated (i.e. the tags setters are called) during the lifecycle or with an explicit call of TagTestModule.populateAttributes .
Parameters:
  tag - the tag
Parameters:
  attributes - the attribute map instance of NestedStandardTag or NestedBodyTag



Methods inherited from com.mockrunner.base.HTMLOutputModule
abstract public String getOutput()(Code)(Java Doc)
public BufferedReader getOutputAsBufferedReader()(Code)(Java Doc)
public org.jdom.Document getOutputAsJDOMDocument()(Code)(Java Doc)
public org.w3c.dom.Document getOutputAsW3CDocument()(Code)(Java Doc)
public String getOutputAsWellformedXML()(Code)(Java Doc)
public void setCaseSensitive(boolean caseSensitive)(Code)(Java Doc)
public void verifyOutput(String expectedOutput)(Code)(Java Doc)
public void verifyOutputContains(String expectedOutput)(Code)(Java Doc)
public void verifyOutputRegularExpression(String expression)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.