Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.htmlparser.tests.parserHelperTests
Class RemarkNodeParserTest  view RemarkNodeParserTest download RemarkNodeParserTest.java

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

public class RemarkNodeParserTest
extends org.htmlparser.tests.ParserTestCase


Field Summary
 
Fields inherited from class org.htmlparser.tests.ParserTestCase
node, nodeCount, parser, reader
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
RemarkNodeParserTest(java.lang.String name)
           
 
Method Summary
 void testDashesInComment()
          Bug reported by John Zook [594301] If dashes exist in a comment, they dont get added to the comment text
 void testDoubleComment()
          Test a comment declaration with two comments.
 void testEmptyComment()
          Test a comment declaration without any comments.
 void testInvalidTag()
          Bug reported by John Zook [594301], invalid remark nodes are accepted as remark nodes.
 void testNonRemarkNode()
           
 void testRemarkNodeBug()
          The bug being reproduced is this :
<!-- saved from url=(0022)http://internet.e-mail --> <HTML> <HEAD><META name="title" content="Training Introduction"> <META name="subject" content=""> <!-- Whats gonna happen now ? --> <TEST> </TEST> The above line is incorrectly parsed - the remark is not correctly identified.
 void testRemarkNodeWithBlankLine()
          This is the simulation of bug report 586756, submitted by John Zook.
 void testRemarkNodeWithNothing()
          This is the simulation of a bug report submitted by Claude Duguay.
 void testSingleComment()
          Test a comment declaration with a comment.
 void testTagWithinRemarkNode()
          Reproduction of bug reported by John Zook [594301] When we have tags like : <!-- <A> --> it doesent get parsed correctly
 void testToPlainTextString()
           
 void testToRawString()
           
 
Methods inherited from class org.htmlparser.tests.ParserTestCase
assertHiddenIDTagPresent, assertNodeCount, assertNodeCount, assertSameType, assertStringEquals, assertTagEquals, assertType, assertXmlEquals, createParser, createParser, createParser, createParser, parse, parseAndAssertNodeCount, parseNodes, removeEscapeCharacters
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, 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

RemarkNodeParserTest

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

testRemarkNodeBug

public void testRemarkNodeBug()
                       throws org.htmlparser.util.ParserException
The bug being reproduced is this :
<!-- saved from url=(0022)http://internet.e-mail --> <HTML> <HEAD><META name="title" content="Training Introduction"> <META name="subject" content=""> <!-- Whats gonna happen now ? --> <TEST> </TEST> The above line is incorrectly parsed - the remark is not correctly identified. This bug was reported by Serge Kruppa (2002-Feb-08).


testToPlainTextString

public void testToPlainTextString()
                           throws org.htmlparser.util.ParserException

testToRawString

public void testToRawString()
                     throws org.htmlparser.util.ParserException

testNonRemarkNode

public void testNonRemarkNode()
                       throws org.htmlparser.util.ParserException

testRemarkNodeWithBlankLine

public void testRemarkNodeWithBlankLine()
                                 throws org.htmlparser.util.ParserException
This is the simulation of bug report 586756, submitted by John Zook. If all the comment contains is a blank line, it breaks the state


testRemarkNodeWithNothing

public void testRemarkNodeWithNothing()
                               throws org.htmlparser.util.ParserException
This is the simulation of a bug report submitted by Claude Duguay. If it is a comment with nothing in it, parser crashes


testTagWithinRemarkNode

public void testTagWithinRemarkNode()
                             throws org.htmlparser.util.ParserException
Reproduction of bug reported by John Zook [594301] When we have tags like : <!-- <A> --> it doesent get parsed correctly


testInvalidTag

public void testInvalidTag()
                    throws org.htmlparser.util.ParserException
Bug reported by John Zook [594301], invalid remark nodes are accepted as remark nodes. <
-
-
ssd -->
This is not supposed to be a remarknode


testDashesInComment

public void testDashesInComment()
                         throws org.htmlparser.util.ParserException
Bug reported by John Zook [594301] If dashes exist in a comment, they dont get added to the comment text


testSingleComment

public void testSingleComment()
                       throws org.htmlparser.util.ParserException
Test a comment declaration with a comment.


testDoubleComment

public void testDoubleComment()
                       throws org.htmlparser.util.ParserException
Test a comment declaration with two comments.


testEmptyComment

public void testEmptyComment()
                      throws org.htmlparser.util.ParserException
Test a comment declaration without any comments.