Java Doc for ContainerTestCase.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » core » container » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.core.container 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.core.container.ContainerTestCase

All known Subclasses:   org.apache.cocoon.forms.formmodel.FieldTestCase,  org.apache.cocoon.woody.datatype.DynamicSelectionListTestCase,  org.apache.cocoon.forms.formmodel.GroupTestCase,  org.apache.lenya.net.InetAddressUtilTest,  org.apache.cocoon.components.source.impl.ZipSourceTestCase,  org.apache.cocoon.woody.datatype.EnumSelectionListTestCase,  org.apache.cocoon.jcr.source.JCRSourceTestCase,  org.apache.lenya.transaction.TransactionTest,  org.apache.cocoon.components.source.impl.WebDAVSourceTestCase,  org.apache.cocoon.woody.datatype.FlowJXPathSelectionListTestCase,  org.apache.lenya.cms.LenyaTestCase,  org.apache.cocoon.SitemapComponentTestCase,  org.apache.cocoon.forms.datatype.AbstractSelectionListTestCase,
ContainerTestCase
public class ContainerTestCase extends TestCase (Code)
JUnit TestCase for Cocoon Components.

This class extends the JUnit TestCase class to setup an environment which makes it possible to easily test Cocoon Components. The following methods and instance variables are exposed for convenience testing:

getManager()
This instance variable contains an initialized service manager which can be used to lookup components configured in the test configuration file. (see below)
getLogger()
This method returns a logger for this test case. By default this logger logs with log level DEBUG.

The following test case configuration can be used as a basis for new tests. Detailed explanations of the configuration elements can be found after the example.

 <testcase>
 <context>
 <entry name="foo" value="bar"/>
 <entry name="baz" class="my.context.Class"/>
 </context>
 <roles>
 <role name="org.apache.avalon.excalibur.datasource.DataSourceComponentSelector"
 shorthand="datasources"
 default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">
 <hint shorthand="jdbc" class="org.apache.avalon.excalibur.datasource.JdbcDataSource"/>
 </role>
 </roles>
 <components>
 <datasources>
 <jdbc name="personell">
 <pool-controller min="5" max="10"/>
 <jdbc name="personnel"/>
 <dburl>jdbc:odbc:test</dburl>
 <user>test</user>
 <password>test</password>
 <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
 </jdbc>
 </datasources>
 </components>
 </testcase>
 

Element Explanation:

testcase
Defines a test case configuration. Must contain one each of the following elements: annotation, context, roles, and components
.
context
Allows context properties to be set in the context passed to any Contextualizable components.
roles
Roles configuration for the components configured in the components element.
components
Used to configure any Components used by the test cases.

version:
   $Id: $

Inner Class :protected static class DefaultLoggerManager implements LoggerManager



Method Summary
protected  voidaddContext(DefaultContext context)
     This method may be overwritten by subclasses to put additional objects into the context programmatically.
protected  LoggergetLogger()
    
protected  ServiceManagergetManager()
    
final protected  Objectlookup(String key)
    
protected  voidprepare()
    
final protected  voidprepare(InputStream testconf)
    
final protected  voidrelease(Object object)
    
protected  voidsetUp()
    
protected  voidtearDown()
    



Method Detail
addContext
protected void addContext(DefaultContext context)(Code)
This method may be overwritten by subclasses to put additional objects into the context programmatically.



getLogger
protected Logger getLogger()(Code)
Return the logger



getManager
protected ServiceManager getManager()(Code)
Return the service manager



lookup
final protected Object lookup(String key) throws ServiceException(Code)



prepare
protected void prepare() throws Exception(Code)
Initializes the ComponentLocator The configuration file is determined by the class name plus .xtest appended, all '.' replaced by '/' and loaded as a resource via classpath



prepare
final protected void prepare(InputStream testconf) throws Exception(Code)
Initializes the ComponentLocator
Parameters:
  testconf - The configuration file is passed as a InputStreamA common way to supply a InputStream is to overwrite the initialize() methodin the sub class, do there whatever is needed to get the right InputStream objectsupplying a conformant xtest configuartion and pass it to this initialize method.the mentioned initialize method is also the place to set a different logging priorityto the member variable m_logPriority.



release
final protected void release(Object object)(Code)



setUp
protected void setUp() throws Exception(Code)



tearDown
protected void tearDown() throws Exception(Code)



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