public void testSourceEventsList()
throws Exception
{
String text = "<source><a href=\"what.html\">what</a></source>";
SinkEventTestingSink sink = new SinkEventTestingSink();
parser.parse( text, sink );
Iterator<SinkEventElement> it = sink.getEventList().iterator();
assertEquals( it, "verbatim", "link", "text", "link_", "verbatim_" );
assertFalse( it.hasNext() );
text = "<source><![CDATA[<a href=\"what.html\">what</a>]]></source>";
sink.reset();
parser.parse( text, sink );
it = sink.getEventList().iterator();
assertEquals( it, "verbatim", "text", "verbatim_" );
assertFalse( it.hasNext() );
text = "<source><![CDATA[<source>what</source>]]></source>";
sink.reset();
parser.parse( text, sink );
it = sink.getEventList().iterator();
assertEquals( it, "verbatim", "text", "verbatim_" );
assertFalse( it.hasNext() );
}