|
||||||||||
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
org.apache.maven.doxia.parser.AbstractParserTest
public abstract class AbstractParserTest
Test the parsing of sample input files.
Note: you have to provide a sample "test." + outputExtension()
file in the test resources directory if you extend this class.
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 | |
---|---|
AbstractParserTest()
|
Method Summary | |
---|---|
protected void |
assertAttributeEquals(SinkEventElement element,
String name,
String attr,
String value)
|
protected void |
assertEquals(Iterator<SinkEventElement> it,
String... names)
|
protected void |
assertEquals(SinkEventElement element,
String name,
Object... args)
|
protected abstract Parser |
createParser()
Create a new instance of the parser to test. |
protected String |
getOutputDir()
Returns the directory where all parser test output will go. |
void |
testDocument()
Parse a test document '"test." + outputExtension()' with parser from createParser() , and output to a text file,
using the TextSink . |
void |
testParser()
Parse a test document '"test." + outputExtension()' with parser from createParser() , and output to a new
WellformednessCheckingSink . |
Methods inherited from class org.apache.maven.doxia.AbstractModuleTest |
---|
getBasedirFile, getTestReader, getTestReader, getTestWriter, getTestWriter, getTestWriterFile, getTestWriterFile, getXmlTestWriter, getXmlTestWriter, outputBaseDir, outputExtension |
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 AbstractParserTest()
Method Detail |
---|
protected abstract Parser createParser()
protected String getOutputDir()
getOutputDir
in class AbstractModuleTest
public final void testParser() throws IOException, ParseException
createParser()
, and output to a new
WellformednessCheckingSink
. Asserts that output is well-formed.
IOException
- if the test document cannot be read.
ParseException
- if the test document cannot be parsed.public final void testDocument() throws IOException, ParseException
createParser()
, and output to a text file,
using the TextSink
.
IOException
- if the test document cannot be read.
ParseException
- if the test document cannot be parsed.protected void assertEquals(SinkEventElement element, String name, Object... args)
protected void assertAttributeEquals(SinkEventElement element, String name, String attr, String value)
protected void assertEquals(Iterator<SinkEventElement> it, String... names)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |