|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.htmlparser.tests.ParserTestCase
org.htmlparser.tests.ParserTest
Field Summary |
Fields inherited from class org.htmlparser.tests.ParserTestCase |
mLexer, node, nodeCount, parser |
Constructor Summary | |
ParserTest(java.lang.String name)
|
Method Summary | |
void |
testDifferentLocale()
See bug #883664 toUpperCase on tag names and attributes depends on locale |
void |
testDoubleQuotedCharset()
Test the case of a double quoted charset directive. |
void |
testElements()
|
void |
testElementsFromWeb()
This testcase needs you to be online. |
void |
testEmbeddedQuoteSplit()
See bug #729368 Embedded quote and split tag |
void |
testFile()
Tests the 'from file' Parser constructor. |
void |
testFileDelete()
Tests deleting a file held open by the parser. |
void |
testFixSpaces()
|
void |
testHTMLCharset()
Test with a HTML header with a charset parameter not matching the HTTP header. |
void |
testHTTPCharset()
Test with a HTTP header with a valid charset parameter. |
void |
testImageCollection()
|
void |
testLinkCollection()
|
void |
testNullUrl()
|
void |
testOutOfMemory()
See bug #728241 OutOfMemory error/ Infinite loop |
void |
testPOST()
Test the Parser(URLConnection) constructor. |
void |
testSetInputHTML()
See bug #826764 ParserException occurs only when using setInputHTML() instea |
void |
testSetRemarkText()
See bug #900128 RemarkNode.setText() does not set Text |
void |
testSetStringText()
See bug #900128 RemarkNode.setText() does not set Text |
void |
testSingleQuotedCharset()
Test the case of a single quoted charset directive. |
void |
testSwitchCharset()
Test the case of a charset directive different than the HTTP header. |
void |
testURLWithSpaces()
|
void |
testXMLTypeToString()
Test reproducing a java.lang.StackOverflowError. |
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, setUp, 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 |
public ParserTest(java.lang.String name)
Method Detail |
public void testElements() throws java.lang.Exception
java.lang.Exception
public void testElementsFromWeb() throws java.lang.Exception
java.lang.Exception
public void testPOST() throws java.lang.Exception
http://www.canadapost.ca/tools/pcl/bin/default-e.asp
:
<form NAME="SearchQuick" method="POST" action="cp_search_response-e.asp" onSubmit="return runSubmit();"> <!-- begin test hidden field code --> <input TYPE="Hidden" NAME="app_language" value="english"> <input TYPE="Hidden" NAME="app_response_start_row_number" value="1"> <input TYPE="Hidden" NAME="app_response_rows_max" value="9"> <input TYPE="Hidden" NAME="app_source" value="quick"> <input TYPE="Hidden" NAME="query_source" value="q"> <input TYPE="Hidden" NAME="name" value> <input TYPE="Hidden" NAME="postal_code" value> <input TYPE="Hidden" NAME="directory_area_name" value> <input TYPE="Hidden" NAME="delivery_mode" value> <input TYPE="Hidden" NAME="Suffix" value> <input TYPE="Hidden" NAME="street_direction" value> <input TYPE="Hidden" NAME="installation_type" value> <input TYPE="Hidden" NAME="delivery_number" value> <input TYPE="Hidden" NAME="installation_name" value> <input TYPE="Hidden" NAME="unit_number" value> <input TYPE="Hidden" NAME="app_state" value="production"> <!-- end test hidden field code --> <p> <table border="0" cellpadding="0" width="90%" cellspacing="0"> <tr> <td class="tbltitle"> Street Number: </td> <td class="tbltitle"> Street Name: </td> <td class="tbltitle"> Street Type:</td> </tr> <tr> <td> <input type="text" name="street_number" size="10" maxlength="10"> </td> <td> <input type="text" name="street_name" size="30" maxlength="40"> <input type="hidden" name="street_type" size="30"> </td> <td><input type="text" name="test" size="10" maxlength="30"></td> </tr> </table> <p> <table border="0" cellpadding="0" width="90%" cellspacing="0"> <tr> <td class="tbltitle"> Municipality (City, Town, etc.): </td> <td class="tbltitle"> Province: </td> </tr> <tr> <td> <input type="text" name="city" size="30" maxlength="30"> </td> <td> <select size="1" name="prov"> <option selected value="NULL">Select</option><option value="AB">AB - Alberta</option><option value="BC">BC - British Columbia</option><option value="MB">MB - Manitoba</option><option value="NB">NB - New Brunswick</option><option value="NL">NL - Newfoundland and Labrador</option><option value="NS">NS - Nova Scotia</option><option value="NT">NT - Northwest Territories</option><option value="NU">NU - Nunavut</option><option value="ON">ON - Ontario</option><option value="PE">PE - Prince Edward Island</option><option value="QC">QC - Quebec</option><option value="SK">SK - Saskatchewan</option><option value="YT">YT - Yukon</option> </select> </td> </tr> <tr> <td height="10"> </td> <td> </td> </tr> <tr> <td colspan="2" align="right" nowrap> <input type="image" src="images/bb_submit-e.gif" name="Search" border="0" WIDTH="88" HEIGHT="23"> <a href="#" onclick="javascript:fClearAllFields();"><img src="images/bb_clear_form-e.gif" name="Clear" border="0" WIDTH="88" HEIGHT="23"></a> </td> </tr> </table> <p> </form>Sumbits the POST and verifies the returned HTML contains an expected value.
java.lang.Exception
public void testFile()
public void testFileDelete()
public void testHTTPCharset()
public void testHTMLCharset()
public void testSwitchCharset() throws ParserException
ParserException
public void testDoubleQuotedCharset() throws ParserException
ParserException
public void testSingleQuotedCharset() throws ParserException
ParserException
public void testNullUrl()
public void testURLWithSpaces() throws ParserException
ParserException
public void testLinkCollection() throws ParserException
ParserException
public void testImageCollection() throws ParserException
ParserException
public void testOutOfMemory() throws java.lang.Exception
java.lang.Exception
public void testEmbeddedQuoteSplit() throws java.lang.Exception
java.lang.Exception
public void testSetInputHTML() throws java.lang.Exception
java.lang.Exception
public void testXMLTypeToString() throws java.lang.Exception
java.lang.Exception
public void testDifferentLocale() throws java.lang.Exception
java.lang.Exception
public void testSetStringText() throws java.lang.Exception
java.lang.Exception
public void testSetRemarkText() throws java.lang.Exception
java.lang.Exception
public void testFixSpaces() throws ParserException
ParserException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |