|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.codehaus.plexus.PlexusTestCase
org.apache.maven.doxia.AbstractModuleTest
public abstract class AbstractModuleTest
Provide some common convenience methods to test Doxia modules (parsers and sinks).
| Field Summary |
|---|
| Fields inherited from class org.codehaus.plexus.PlexusTestCase |
|---|
container, context |
| Fields inherited from interface org.apache.maven.doxia.markup.Markup |
|---|
COLON, EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SEMICOLON, SLASH, SPACE, STAR |
| Constructor Summary | |
|---|---|
AbstractModuleTest()
|
|
| Method Summary | |
|---|---|
protected File |
getBasedirFile()
Returns the common base directory. |
protected abstract String |
getOutputDir()
Returns the directory where test output will go. |
protected Reader |
getTestReader(String baseName)
Returns an InputStreamReader to read a resource from a file in the test target output directory. |
protected Reader |
getTestReader(String baseName,
String extension)
Returns an InputStreamReader to read a resource from a file in the test target output directory. |
protected Writer |
getTestWriter(String baseName)
Returns a FileWriter to write to a file with the given name in the test target output directory. |
protected Writer |
getTestWriter(String baseName,
String extension)
Returns a FileWriter to write to a file with the given name in the test target output directory. |
protected File |
getTestWriterFile(String baseName)
|
protected File |
getTestWriterFile(String baseName,
String extension)
|
protected Writer |
getXmlTestWriter(String baseName)
Returns an XML FileWriter to write to a file with the given name in the test target output directory. |
protected Writer |
getXmlTestWriter(String baseName,
String extension)
Returns an XML FileWriter to write to a file with the given name in the test target output directory. |
protected String |
outputBaseDir()
Returns the base directory where all test output will go. |
protected abstract String |
outputExtension()
Determines the default file extension for the current module. |
| Methods inherited from class org.codehaus.plexus.PlexusTestCase |
|---|
customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setUp, tearDown |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractModuleTest()
| Method Detail |
|---|
protected Writer getTestWriter(String baseName,
String extension)
throws IOException
baseName - The name of the target file.extension - The file extension of the file to write.
IOException - If the FileWriter could not be generated.WriterFactory.newWriter(File, String)
protected File getTestWriterFile(String baseName,
String extension)
protected Writer getXmlTestWriter(String baseName)
throws IOException
baseName - The name of the target file.
IOException - If the FileWriter could not be generated.getXmlTestWriter(String, String)
protected Writer getXmlTestWriter(String baseName,
String extension)
throws IOException
baseName - The name of the target file.extension - The file extension of the file to write.
IOException - If the FileWriter could not be generated.WriterFactory.newXmlWriter(File)
protected Writer getTestWriter(String baseName)
throws IOException
baseName - The name of the target file.
IOException - If the FileWriter could not be generated.getTestWriter(String, String)protected File getTestWriterFile(String baseName)
protected Reader getTestReader(String baseName,
String extension)
baseName - The name of the resource file to read.extension - The file extension of the resource file to read.
protected Reader getTestReader(String baseName)
baseName - The name of the resource file to read.
getTestReader(String, String)protected File getBasedirFile()
protected final String outputBaseDir()
protected abstract String outputExtension()
protected abstract String getOutputDir()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||