org.htmlparser.tests.tagTests
Class TitleTagTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.htmlparser.tests.ParserTestCase
              extended byorg.htmlparser.tests.tagTests.TitleTagTest
All Implemented Interfaces:
junit.framework.Test

public class TitleTagTest
extends ParserTestCase


Field Summary
 
Fields inherited from class org.htmlparser.tests.ParserTestCase
mLexer, node, nodeCount, parser
 
Constructor Summary
TitleTagTest(java.lang.String name)
           
 
Method Summary
protected  void setUp()
           
 void testDoubleTitleTag()
          If there are duplicates of the title tag, the parser crashes.
 void testIncompleteTitle()
          Testcase to reproduce a bug reported by Cedric Rosa, on not ending the title tag correctly, we would get null pointer exceptions..
 void testNoEndTitleTag()
          Testcase based on Claude Duguay's report.
 void testScan()
           
 void testTitleTagContainsJspTag()
           
 void testToHTML()
           
 void testToPlainTextString()
           
 void testToString()
           
 
Methods inherited from class org.htmlparser.tests.ParserTestCase
assertHiddenIDTagPresent, assertNodeCount, assertNodeCount, assertSameType, assertStringEquals, assertSuperType, assertTagEquals, assertType, assertXmlEquals, createParser, createParser, createParser, createParser, failWithMessage, getParser, main, parse, parseAndAssertNodeCount, parseNodes, removeEscapeCharacters, setParser
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TitleTagTest

public TitleTagTest(java.lang.String name)
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

testToPlainTextString

public void testToPlainTextString()
                           throws ParserException
Throws:
ParserException

testToHTML

public void testToHTML()
                throws ParserException
Throws:
ParserException

testToString

public void testToString()
                  throws ParserException
Throws:
ParserException

testScan

public void testScan()
              throws ParserException
Throws:
ParserException

testIncompleteTitle

public void testIncompleteTitle()
                         throws ParserException
Testcase to reproduce a bug reported by Cedric Rosa, on not ending the title tag correctly, we would get null pointer exceptions..

Throws:
ParserException

testDoubleTitleTag

public void testDoubleTitleTag()
                        throws ParserException
If there are duplicates of the title tag, the parser crashes. This bug was reported by Claude Duguay

Throws:
ParserException

testNoEndTitleTag

public void testNoEndTitleTag()
                       throws ParserException
Testcase based on Claude Duguay's report. This proves that the parser throws exceptions when faced with malformed html

Throws:
ParserException

testTitleTagContainsJspTag

public void testTitleTagContainsJspTag()
                                throws ParserException
Throws:
ParserException