[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/temporaryFailures AttributeParserTest.java,1.15
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-10-02 23:49:03
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/temporaryFailures In directory sc8-pr-cvs1:/tmp/cvs-serv28867/tests/temporaryFailures Modified Files: AttributeParserTest.java Log Message: Moved SpecialHashTable to util. Fixed some attribute bugs and some test cases. Index: AttributeParserTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/temporaryFailures/AttributeParserTest.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AttributeParserTest.java 28 Sep 2003 15:33:59 -0000 1.15 --- AttributeParserTest.java 2 Oct 2003 23:48:54 -0000 1.16 *************** *** 41,44 **** --- 41,45 ---- import org.htmlparser.tags.data.TagData; import org.htmlparser.tests.ParserTestCase; + import org.htmlparser.util.SpecialHashtable; public class AttributeParserTest extends ParserTestCase { *************** *** 96,100 **** public void testValueMissing() { getParameterTableFor("INPUT type=\"checkbox\" name=\"Authorize\" value=\"Y\" checked"); ! assertEquals("Name of Tag","INPUT",table.get(Tag.TAGNAME)); assertEquals("Type","checkbox",table.get("TYPE")); assertEquals("Name","Authorize",table.get("NAME")); --- 97,101 ---- public void testValueMissing() { getParameterTableFor("INPUT type=\"checkbox\" name=\"Authorize\" value=\"Y\" checked"); ! assertEquals("Name of Tag","INPUT",table.get(SpecialHashtable.TAGNAME)); assertEquals("Type","checkbox",table.get("TYPE")); assertEquals("Name","Authorize",table.get("NAME")); *************** *** 116,120 **** String value1 = (String)table.get(key1); assertEquals("Expected value 1", "Remarks",value1); ! String key2 = Tag.TAGNAME; assertEquals("Expected Value 2","TEXTAREA",table.get(key2)); } --- 117,121 ---- String value1 = (String)table.get(key1); assertEquals("Expected value 1", "Remarks",value1); ! String key2 = SpecialHashtable.TAGNAME; assertEquals("Expected Value 2","TEXTAREA",table.get(key2)); } *************** *** 122,126 **** public void testNullTag(){ getParameterTableFor("INPUT type="); ! assertEquals("Name of Tag","INPUT",table.get(Tag.TAGNAME)); assertEquals("Type","",table.get("TYPE")); } --- 123,127 ---- public void testNullTag(){ getParameterTableFor("INPUT type="); ! assertEquals("Name of Tag","INPUT",table.get(SpecialHashtable.TAGNAME)); assertEquals("Type","",table.get("TYPE")); } *************** *** 149,153 **** "tag name", "A", ! (String)table.get(Tag.TAGNAME) ); } --- 150,154 ---- "tag name", "A", ! (String)table.get(SpecialHashtable.TAGNAME) ); } *************** *** 164,168 **** public void testEmptyTag () { getParameterTableFor(""); ! assertNotNull ("No Tag.TAGNAME",table.get(Tag.TAGNAME)); } --- 165,169 ---- public void testEmptyTag () { getParameterTableFor(""); ! assertNotNull ("No Tag.TAGNAME",table.get(SpecialHashtable.TAGNAME)); } *************** *** 196,200 **** { getParameterTableFor("body onLoad=defaultStatus=''"); ! String name = (String)table.get(Tag.TAGNAME); assertNotNull ("No Tag.TAGNAME", name); assertStringEquals("tag name parsed incorrectly", "BODY", name); --- 197,201 ---- { getParameterTableFor("body onLoad=defaultStatus=''"); ! String name = (String)table.get(SpecialHashtable.TAGNAME); assertNotNull ("No Tag.TAGNAME", name); assertStringEquals("tag name parsed incorrectly", "BODY", name); |