public class MarkdownParserTest extends AbstractParserTest
MarkdownParser
.Modifier and Type | Field and Description |
---|---|
protected MarkdownParser |
parser
The
MarkdownParser used for the tests. |
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 and Description |
---|
MarkdownParserTest() |
Modifier and Type | Method and Description |
---|---|
protected Parser |
createParser() |
protected String |
outputExtension() |
protected SinkEventTestingSink |
parseFileToEventTestingSink(String file)
Parse the file and return a
SinkEventTestingSink . |
protected void |
setUp() |
void |
testBoldSinkEvent()
Assert the bold sink event is fired when parsing "bold.md".
|
void |
testCodeSinkEvent()
Assert the code sink event is fired when parsing "code.md".
|
void |
testCommentBeforeHeadingSinkEvent()
Assert the first header is passed as title event when parsing "comment-before-heading.md".
|
void |
testFirstHeadingSinkEvent()
Assert the first header is passed as title event when parsing "first-heading.md".
|
void |
testHtmlContent()
Assert the first header is passed as title event when parsing "comment-before-heading.md".
|
void |
testImageSinkEvent()
Assert the image sink event is fired when parsing "image.md".
|
void |
testItalicSinkEvent()
Assert the italic sink event is fired when parsing "italic.md".
|
void |
testLinkSinkEvent()
Assert the link sink event is fired when parsing "link.md".
|
void |
testLinkWithAnchorAndQuery() |
void |
testListSinkEvent()
Assert the list sink event is fired when parsing "list.md".
|
void |
testMetadataSinkEvent()
Assert the metadata is passed through when parsing "metadata.md".
|
void |
testNumberedListSinkEvent()
Assert the numbered list sink event is fired when parsing "numbered-list.md".
|
void |
testParagraphSinkEvent()
Assert the paragraph sink event is fired when parsing "paragraph.md".
|
void |
testTocMacro() |
void |
testTocMacroDoxia559()
TOC macro fails with EmptyStackException when title 2 followed by title 4 then title 2
|
assertAttributeEquals, assertEquals, assertEquals, assertStartsWith, getOutputDir, testDocument, testParser
getBasedirFile, getTestReader, getTestReader, getTestWriter, getTestWriter, getTestWriterFile, getTestWriterFile, getXmlTestWriter, getXmlTestWriter, normalizeLineEnds, outputBaseDir
customizeComponentConfiguration, customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setupContainer, tearDown
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
protected MarkdownParser parser
MarkdownParser
used for the tests.public MarkdownParserTest()
protected void setUp() throws Exception
setUp
in class org.codehaus.plexus.PlexusTestCase
Exception
protected Parser createParser()
createParser
in class AbstractParserTest
protected String outputExtension()
outputExtension
in class AbstractModuleTest
public void testParagraphSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testBoldSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testItalicSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testCodeSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testImageSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testLinkSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testLinkWithAnchorAndQuery() throws Exception
Exception
public void testListSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testNumberedListSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testMetadataSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testFirstHeadingSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testCommentBeforeHeadingSinkEvent() throws Exception
Exception
- if the event list is not correct when parsing the document.public void testHtmlContent() throws Exception
Exception
- if the event list is not correct when parsing the document.protected SinkEventTestingSink parseFileToEventTestingSink(String file) throws ParseException
SinkEventTestingSink
.file
- the file to parse with parser
.ParseException
- if the document parsing failed.public void testTocMacro() throws Exception
Exception
public void testTocMacroDoxia559() throws Exception
Exception
Copyright © 2005–2017 The Apache Software Foundation. All rights reserved.