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

Quick Search    Search Deep

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

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

public class AttributeParserTest
extends org.htmlparser.tests.ParserTestCase


Field Summary
private  org.htmlparser.parserHelper.AttributeParser parser
           
private  java.util.Hashtable table
           
private  org.htmlparser.tags.Tag tag
           
 
Fields inherited from class org.htmlparser.tests.ParserTestCase
node, nodeCount, reader
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
AttributeParserTest(java.lang.String name)
           
 
Method Summary
 void getParameterTableFor(java.lang.String tagContents)
           
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
 void testAttributeWithSpuriousEqualTo()
           
 void testEmptyTag()
          Believe it or not Moi (vincent_aumont) wants htmlparser to parse a text file containing something that looks nearly like a tag:
 void testIncorrectSpaceKeyBug()
          This is a simulation of a bug reported by Dhaval Udani - wherein a space before the end of the tag causes a problem - there is a key in the table with just a space in it and an empty value
 void testJspWithinAttributes()
          Test attributes when they contain scriptlets.
 void testNullTag()
           
 void testParseEmptyValues()
           
 void testParseMissingEqual()
           
 void testParseParameters()
           
 void testParseTokenValues()
           
 void testPlainParams()
           
 void testQuestionMarksInAttributes()
           
 void testScriptedTag()
          Test Script in attributes.
 void testTwoParams()
           
 void testValueMissing()
           
 
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, 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
 

Field Detail

parser

private org.htmlparser.parserHelper.AttributeParser parser

tag

private org.htmlparser.tags.Tag tag

table

private java.util.Hashtable table
Constructor Detail

AttributeParserTest

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

setUp

protected void setUp()
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


getParameterTableFor

public void getParameterTableFor(java.lang.String tagContents)

testParseParameters

public void testParseParameters()

testParseTokenValues

public void testParseTokenValues()

testParseEmptyValues

public void testParseEmptyValues()

testParseMissingEqual

public void testParseMissingEqual()

testTwoParams

public void testTwoParams()

testPlainParams

public void testPlainParams()

testValueMissing

public void testValueMissing()

testIncorrectSpaceKeyBug

public void testIncorrectSpaceKeyBug()
This is a simulation of a bug reported by Dhaval Udani - wherein a space before the end of the tag causes a problem - there is a key in the table with just a space in it and an empty value


testNullTag

public void testNullTag()

testAttributeWithSpuriousEqualTo

public void testAttributeWithSpuriousEqualTo()

testQuestionMarksInAttributes

public void testQuestionMarksInAttributes()

testEmptyTag

public void testEmptyTag()
Believe it or not Moi (vincent_aumont) wants htmlparser to parse a text file containing something that looks nearly like a tag:
 "                        basic_string<char, string_char_traits<char>, <>>::basic_string()"
 
This was throwing a null pointer exception when the empty <> was encountered. Bug #725420 NPE in StringBean.visitTag


testJspWithinAttributes

public void testJspWithinAttributes()
Test attributes when they contain scriptlets. Submitted by Cory Seefurth See also feature request #725376 Handle script in attributes. Only perform this test if it's version 1.4 or higher.


testScriptedTag

public void testScriptedTag()
Test Script in attributes. See feature request #725376 Handle script in attributes. Only perform this test if it's version 1.4 or higher.