Java Doc for TidyTestCase.java in  » HTML-Parser » JTidy » org » w3c » tidy » 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 » HTML Parser » JTidy » org.w3c.tidy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.tidy.TidyTestCase

All known Subclasses:   org.w3c.tidy.JTidyParserBugsTest,  org.w3c.tidy.JTidyWarningBugsTest,  org.w3c.tidy.TidyCrashingBugsTest,  org.w3c.tidy.JTidyBugsTest,  org.w3c.tidy.TidyOutputBugsTest,  org.w3c.tidy.TidyWarningBugsTest,  org.w3c.tidy.TidyWordBugsTest,  org.w3c.tidy.TidyEncodingBugsTest,  org.w3c.tidy.TidyBugsTest,
TidyTestCase
public class TidyTestCase extends TestCase (Code)

author:
   fgiust
version:
   $Revision: 1.26 $ ($Author: fgiust $)

Inner Class :static class MsgXmlHandler extends DefaultHandler

Field Summary
protected  StringWritererrorLog
     Error out.
protected  Loglog
     logger.
protected  TestMessageListenermessageListener
     message listener.
protected  Tidytidy
     Tidy test instance.
protected  StringtidyOut
     Tidy output.

Constructor Summary
public  TidyTestCase(String name)
     Instantiate a new Test case.

Method Summary
protected  voidassertEquals(String tidyOutput, URL correctFile)
     assert generated output and test file are equals.
protected  voidassertErrors(int expectedNumber)
     Utility method: assert no errors were reported in the last tidy run.
protected  voidassertLogContains(String expectedString)
     Utility method: asserts a given String can be found in the error log.
protected  voidassertLogDoesntContains(String expectedString)
     Utility method: asserts a given String can't be found in the error log.
protected  voidassertNoErrors()
     Utility method: assert no errors were reported in the last tidy run.
protected  voidassertNoWarnings()
     Utility method: assert no warnings were reported in the last tidy run.
protected  voidassertWarnings(int expectedNumber)
     Utility method: assert no warnings were reported in the last tidy run.
protected  StringcleanUpFilePath(String fileName)
     Utility method to clean up file path returned by URLs.
protected  voidcompareMsgXml(URL messagesFile)
     Parse an existing msg file and assert that content is identical to current output.
protected  voidexecuteTidyTest(String fileName)
     Executes a tidy test.
protected  DocumentparseDomTest(String fileName)
     Basic test for DOM parser.
protected  voidsetUp()
    
protected  voidtearDown()
    

Field Detail
errorLog
protected StringWriter errorLog(Code)
Error out.



log
protected Log log(Code)
logger.



messageListener
protected TestMessageListener messageListener(Code)
message listener.



tidy
protected Tidy tidy(Code)
Tidy test instance.



tidyOut
protected String tidyOut(Code)
Tidy output.




Constructor Detail
TidyTestCase
public TidyTestCase(String name)(Code)
Instantiate a new Test case.
Parameters:
  name - test name




Method Detail
assertEquals
protected void assertEquals(String tidyOutput, URL correctFile) throws FileNotFoundException, IOException(Code)
assert generated output and test file are equals.
Parameters:
  tidyOutput - tidy output as string
Parameters:
  correctFile - URL used to load the file for comparison
throws:
  FileNotFoundException - if test file is not found
throws:
  IOException - in reading file



assertErrors
protected void assertErrors(int expectedNumber)(Code)
Utility method: assert no errors were reported in the last tidy run.
Parameters:
  expectedNumber - expected number of errors.



assertLogContains
protected void assertLogContains(String expectedString)(Code)
Utility method: asserts a given String can be found in the error log.
Parameters:
  expectedString - expected String in error log.



assertLogDoesntContains
protected void assertLogDoesntContains(String expectedString)(Code)
Utility method: asserts a given String can't be found in the error log.
Parameters:
  expectedString - expected String in error log.



assertNoErrors
protected void assertNoErrors()(Code)
Utility method: assert no errors were reported in the last tidy run.



assertNoWarnings
protected void assertNoWarnings()(Code)
Utility method: assert no warnings were reported in the last tidy run.



assertWarnings
protected void assertWarnings(int expectedNumber)(Code)
Utility method: assert no warnings were reported in the last tidy run.
Parameters:
  expectedNumber - expected number of warnings.



cleanUpFilePath
protected String cleanUpFilePath(String fileName)(Code)
Utility method to clean up file path returned by URLs.
Parameters:
  fileName - file name as given by URL.getFile() String fileName



compareMsgXml
protected void compareMsgXml(URL messagesFile) throws Exception(Code)
Parse an existing msg file and assert that content is identical to current output.
Parameters:
  messagesFile - URL to mesage file
throws:
  Exception - any exception generated during the test



executeTidyTest
protected void executeTidyTest(String fileName) throws Exception(Code)
Executes a tidy test. This method simply requires the input file name. If a file with the same name but with a ".cfg" extension is found is used as configuration file for the test, otherwise the default config will be used. If a file with the same name, but with the ".out" extension is found, tidy will the result with the content of such file.
Parameters:
  fileName - input file name
throws:
  Exception - any exception generated during the test



parseDomTest
protected Document parseDomTest(String fileName) throws Exception(Code)
Basic test for DOM parser. Test is set up using [fileName.cfg] configuration if the file exists. Calls tidy.parseDOM and returns the Document to the caller.
Parameters:
  fileName - input file name parsed Document
throws:
  Exception - any exception generated during the test



setUp
protected void setUp() throws Exception(Code)

See Also:   junit.framework.TestCase.setUp



tearDown
protected void tearDown() throws Exception(Code)

See Also:   junit.framework.TestCase.tearDown



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