import junit.framework.TestCase;
public class HtmlParserTest extends TestCase {
public void testParser() throws IOException {
HtmlParser parser = new HtmlParser();
parser.setTrim(true);
HtmlListener listener = new HtmlListener();
Reader in = new InputStreamReader( MSystem.locateResource(this, getClass().getSimpleName() + ".xml").openStream() );
parser.parse(in, listener);
assertTrue(listener.pi.getFirst().equals("xml version=\"1.0\" encoding=\"ISO-8859-1\""));
assertTrue(listener.note.getFirst().equals("Edited"));
assertTrue(listener.open.size() == listener.close.size());
assertTrue(listener.single.size() == 1);