com.ssx.xml.output.sinks
Class Test_TextSink

java.lang.Object
  extended byTestCase
      extended bycom.ssx.xml.output.TestsForXmlOutput
          extended bycom.ssx.xml.output.sinks.Test_TextSink

public class Test_TextSink
extends TestsForXmlOutput

Test for XML Text output to a stream.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ssx.xml.output.TestsForXmlOutput
END_OF_LINE_MARKER, EXPAND_QNAMES, INDENT_SPACER, USE_FORMATTING, USE_SINGLE_QUOTE
 
Constructor Summary
Test_TextSink(String name)
           
 
Method Summary
protected  String getXmlText(XmlOutput output)
          Convert the XmlOutput object to a string
protected  XmlOutput newXmlOutput(HashMap properties)
          Create a new XmlOutput instance
 void testAttributes_addCdata()
          If the proportion of illegal characters to legal characters is large then a CDATA will be used to wrap the output rather than encoding illegal characters.
 void testXmlDeclaration()
          The XML declaration is included at the start of every stream
 
Methods inherited from class com.ssx.xml.output.TestsForXmlOutput
testAddDuplicateAttribute_Name, testAddDuplicateAttribute_Namespace, testAddNamespaceNodes, testAttributes_AddComment, testAttributes_AddInvalidComment, testAttributes_addProcessingInstruction, testAttributes_addText, testAttributes_addTextWithEncoding, testAttributes_CallAfterClose, testAttributes_DigitStartingName, testAttributes_EncodeSpecialChars, testAttributes_EscapeQuotes, testAttributes_Invalid, testAttributes, testAttributesNullValue, testElements_DigitStartingName, testElements_Nested, testElements_rootElements, testElements_Sequential, testElements_startEndMatching, testElements_Unballanced, testFormatting, testFormatting2, testFormatting3, testRedundantNamespaceDeclarationsAreIgnored, testResolveNamespacePrefixes, testValidateNamespacePrefixes, testValidateNamespacePrefixes2, testWritePIFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Test_TextSink

public Test_TextSink(String name)
Parameters:
name - The test class name
Method Detail

getXmlText

protected String getXmlText(XmlOutput output)
Description copied from class: TestsForXmlOutput
Convert the XmlOutput object to a string

Specified by:
getXmlText in class TestsForXmlOutput
Parameters:
output - An XmlOutput instance
Returns:
The Xml text that has been output since the given XmlOutput instance has been created.
See Also:
Return the accumulated string in the output writer. Strip off the xml declaration so all the tests don't have to include it.

newXmlOutput

protected XmlOutput newXmlOutput(HashMap properties)
Description copied from class: TestsForXmlOutput
Create a new XmlOutput instance

Specified by:
newXmlOutput in class TestsForXmlOutput
Parameters:
properties - The Sink configuration properties
Returns:
An XmlOutput instance
See Also:
TestsForXmlOutput.newXmlOutput(HashMap)

testXmlDeclaration

public void testXmlDeclaration()
The XML declaration is included at the start of every stream


testAttributes_addCdata

public void testAttributes_addCdata()
If the proportion of illegal characters to legal characters is large then a CDATA will be used to wrap the output rather than encoding illegal characters.