| 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 $) |
Method Summary | |
protected void | assertEquals(String tidyOutput, URL correctFile) assert generated output and test file are equals. | protected void | assertErrors(int expectedNumber) Utility method: assert no errors were reported in the last tidy run. | protected void | assertLogContains(String expectedString) Utility method: asserts a given String can be found in the error log. | protected void | assertLogDoesntContains(String expectedString) Utility method: asserts a given String can't be found in the error log. | protected void | assertNoErrors() Utility method: assert no errors were reported in the last tidy run. | protected void | assertNoWarnings() Utility method: assert no warnings were reported in the last tidy run. | protected void | assertWarnings(int expectedNumber) Utility method: assert no warnings were reported in the last tidy run. | protected String | cleanUpFilePath(String fileName) Utility method to clean up file path returned by URLs. | protected void | compareMsgXml(URL messagesFile) Parse an existing msg file and assert that content is identical to current output. | protected void | executeTidyTest(String fileName) Executes a tidy test. | protected Document | parseDomTest(String fileName) Basic test for DOM parser. | protected void | setUp() | protected void | tearDown() |
log | protected Log log(Code) | | logger.
|
TidyTestCase | public TidyTestCase(String name)(Code) | | Instantiate a new Test case.
Parameters: name - test name |
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 |
|
|