public class

TestEditorMacroUnmarshaller

extends TestCase
java.lang.Object
   ↳ junit.framework.Assert
     ↳ junit.framework.TestCase
       ↳ com.atlassian.confluence.content.render.xhtml.editor.macro.TestEditorMacroUnmarshaller

Summary

Public Constructors
TestEditorMacroUnmarshaller()
Public Methods
void testBrTagConvertedToNewLineInPlainTextBodies()
void testMarkupOrStylesStrippedFromPlainTextBody()
void testNestedPreTagsInBody()
There are copy and paste bugs that can result in a pre tag being pasted inside the pre tag for a plain text placeholder.
void testNonPreTagsInPlainTextBodyNotDropped()
void testParseBodylessMacro()
void testParseInlineMacroWithRichTextBody()
void testParseMacroWithEmptyPreFormattedBody()
void testParseMacroWithMissingName()
void testParseMacroWithPreFormattedBodyContainingEntities()
void testParseMacroWithPreFormattedBodyContainingPredefinedEntities()
void testParseMacroWithRenderedBody()
void testParseUnknownBodylessMacro()
Tests unmarshalling of an for an unknown or disabled macro, without a body, with a default parameter and two parameters.
void testParseUnknownPlainBodyMacro()
Tests unmarshalling of an for an unknown or disabled macro, with a plain text body, with no default parameter and a single parameters.
void testParseUnknownRichBodyMacro()
Tests unmarshalling of an for an unknown or disabled macro, with a rich text body, with a default parameter and no parameters.
void testParseWithAmpCharEntityInParam()
Tests that the XML character entity & may be used in a parameter value.
void testUnmarshalMacroBodyAttribute()
Protected Methods
void setUp()
void tearDown()
[Expand]
Inherited Methods
From class junit.framework.TestCase
From class junit.framework.Assert
From class java.lang.Object
From interface junit.framework.Test

Public Constructors

public TestEditorMacroUnmarshaller ()

Public Methods

public void testBrTagConvertedToNewLineInPlainTextBodies ()

Throws
Exception

public void testMarkupOrStylesStrippedFromPlainTextBody ()

Throws
Exception

public void testNestedPreTagsInBody ()

There are copy and paste bugs that can result in a pre tag being pasted inside the pre tag for a plain text placeholder.

Throws
Exception

public void testNonPreTagsInPlainTextBodyNotDropped ()

Throws
Exception

public void testParseBodylessMacro ()

Throws
Exception

public void testParseInlineMacroWithRichTextBody ()

Throws
Exception

public void testParseMacroWithEmptyPreFormattedBody ()

Throws
Exception

public void testParseMacroWithMissingName ()

Throws
Exception

public void testParseMacroWithPreFormattedBodyContainingEntities ()

Throws
Exception

public void testParseMacroWithPreFormattedBodyContainingPredefinedEntities ()

Throws
Exception

public void testParseMacroWithRenderedBody ()

Throws
Exception

public void testParseUnknownBodylessMacro ()

Tests unmarshalling of an for an unknown or disabled macro, without a body, with a default parameter and two parameters.

Throws
Exception if there is an unexpected problem.

public void testParseUnknownPlainBodyMacro ()

Tests unmarshalling of an for an unknown or disabled macro, with a plain text body, with no default parameter and a single parameters.

Throws
Exception if there is an unexpected problem.

public void testParseUnknownRichBodyMacro ()

Tests unmarshalling of an for an unknown or disabled macro, with a rich text body, with a default parameter and no parameters.

Throws
Exception if there is an unexpected problem.

public void testParseWithAmpCharEntityInParam ()

Tests that the XML character entity & may be used in a parameter value. If & works other XML char entities such as "e; should work. Tested here because TestMacroNameAndParameterSubParser does not use strings that contain XHTML. As a result is is safer to test character entities here.

Throws
Exception if unexpected problem

public void testUnmarshalMacroBodyAttribute ()

Throws
Exception

Protected Methods

protected void setUp ()

Throws
Exception

protected void tearDown ()

Throws
Exception