Java Doc for AbsDeploymentTest.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas_lib » deployment » tests » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas_lib.deployment.tests 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas_lib.deployment.tests.AbsDeploymentTest

All known Subclasses:   org.objectweb.jonas_client.deployment.tests.JonasClientDeploymentTest,  org.objectweb.jonas_ejb.deployment.tests.JonasEJBDeploymentTest,  org.objectweb.jonas_web.deployment.tests.WebDeploymentTest,  org.objectweb.jonas_ws.deployment.tests.WsDeploymentTest,  org.objectweb.jonas_domain.tests.DomainMapTest,  org.objectweb.jonas_web.deployment.tests.JonasWebDeploymentTest,  org.objectweb.jonas_clusterd.tests.ClusterDaemonConfigurationTest,  org.objectweb.jonas_ejb.deployment.tests.EJBDeploymentTest,  org.objectweb.jonas_client.deployment.tests.ClientDeploymentTest,  org.objectweb.jonas_rar.deployment.tests.JonasRarDeploymentTest,  org.objectweb.jonas_ws.deployment.tests.JonasWsDeploymentTest,  org.objectweb.jonas_rar.deployment.tests.RarDeploymentTest,  org.objectweb.jonas_ear.deployment.tests.EarDeploymentTest,
AbsDeploymentTest
abstract public class AbsDeploymentTest (Code)
Defines an abstract class for testing the classes built with Digester
author:
   Florent Benoit



Constructor Summary
protected  AbsDeploymentTest()
    

Method Summary
protected  voidaddElement(Element element, Method method, Class[] argsMethod, boolean random)
    
protected  booleanaleatOK()
    
protected  voidcheckDiff(String xmlOriginal, String xmlParsed)
    
protected  StringconvertUpperCaseToXml(String name)
    
public  voidfill(Element element, boolean random)
     Fill the structure of the given element.
protected  voidfillQName(Element element, Method method, boolean random)
    
protected  voidfillString(Element element, Method method, boolean random)
    
protected  StringgetNameCounterForElement(Element element, Method method)
    
abstract public  AbsElementgetTopLevelElement()
    
protected  intnbAleat()
    
abstract public  Stringparse(Reader reader, String name, boolean validation)
    
public  voidparseElement()
    
public  voidparseXmlfromFile(String fileName)
    
protected  voidsetElement(Element element, Method method, Class[] argsMethod, boolean random)
    
public  voidstartTest(boolean random)
    
public  voidstress()
    


Constructor Detail
AbsDeploymentTest
protected AbsDeploymentTest()(Code)
Build a new Test




Method Detail
addElement
protected void addElement(Element element, Method method, Class[] argsMethod, boolean random) throws Exception(Code)
Add to an element its sub element Add many times a sub-element if random is not set to true
Parameters:
  element - element on which we have to add sub elements
Parameters:
  method - method of the element (determine type of the sub element
Parameters:
  argsMethod - arguments of the method
Parameters:
  random - use random or not
throws:
  Exception - if the subelement can not be added



aleatOK
protected boolean aleatOK()(Code)
Random for returning true or false true or false with random



checkDiff
protected void checkDiff(String xmlOriginal, String xmlParsed) throws Exception(Code)
Check the difference between original xml and parsed xml
Parameters:
  xmlOriginal - original XML
Parameters:
  xmlParsed - parsed XML
throws:
  Exception - if there is a difference between original and parsedXML



convertUpperCaseToXml
protected String convertUpperCaseToXml(String name)(Code)
Convert the name of an element into its xml string representation example : WebApp --> web-app
Parameters:
  name - the name of the element to convert the xml string representation of an element



fill
public void fill(Element element, boolean random) throws Exception(Code)
Fill the structure of the given element. Fill randomly if random is set to true
Parameters:
  element - element to fill
Parameters:
  random - determines if the element must be filled randomly or not
throws:
  Exception - if the element can not be filled



fillQName
protected void fillQName(Element element, Method method, boolean random) throws Exception(Code)
Set the QName attribute of the given element
Parameters:
  element - element on which we have to set the string
Parameters:
  method - method of the element (determine type of the sub element
Parameters:
  random - use random or not
throws:
  Exception - if the QName can not be set



fillString
protected void fillString(Element element, Method method, boolean random) throws Exception(Code)
Set the string attribute of the given element
Parameters:
  element - element on which we have to set the string
Parameters:
  method - method of the element (determine type of the sub element
Parameters:
  random - use random or not
throws:
  Exception - if the String attribute can not be added



getNameCounterForElement
protected String getNameCounterForElement(Element element, Method method)(Code)
Gives a Name + counter for a type of an element This is used to add counter when adding xml attributes Only use in order to make easier the read of the parsed XML file
Parameters:
  element - the given element for which we want a counter
Parameters:
  method - the name of the string to add the Name + counter for the specified element type



getTopLevelElement
abstract public AbsElement getTopLevelElement() throws Exception(Code)



nbAleat
protected int nbAleat()(Code)
Gives a number between 0 and 5 a random intger number between 0 and 5



parse
abstract public String parse(Reader reader, String name, boolean validation) throws Exception(Code)



parseElement
public void parseElement() throws Exception(Code)
Gets the xml after digester parsing
throws:
  Exception - if the parsing fail



parseXmlfromFile
public void parseXmlfromFile(String fileName) throws Exception(Code)
parse with validation from an xml file
throws:
  Exception - if the parsing fail



setElement
protected void setElement(Element element, Method method, Class[] argsMethod, boolean random) throws Exception(Code)
Set the subelement of an element The subelement may not be set if random is used
Parameters:
  element - element on which we have to add sub elements
Parameters:
  method - method of the element (determine type of the sub element
Parameters:
  argsMethod - arguments of the method
Parameters:
  random - use random or not
throws:
  Exception - if the subelement can not be set



startTest
public void startTest(boolean random) throws Exception(Code)
Defines the function for the specific test
Parameters:
  random - use random or not to fill elements
throws:
  Exception - if the test failed



stress
public void stress() throws Exception(Code)
Create an xml structure and then parse the resulting xml and check the result No validation is done if random is set to true
throws:
  Exception - if the stress test is not successfull



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.