Java Doc for UURIFactoryTest.java in  » Web-Crawler » heritrix » org » archive » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Crawler » heritrix » org.archive.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.archive.net.UURIFactoryTest

UURIFactoryTest
public class UURIFactoryTest extends TestCase (Code)
Test UURIFactory for proper UURI creation across variety of important/tricky cases. Be careful writing this file. Make sure you write it with UTF-8 encoding.
author:
   igor stack gojomo




Method Summary
protected  UURInoChangeExpected(String original)
    
final public  voidtest2kURI()
     Test for [ 1012520 ] UURI.length() > 2k.
final public  voidtestAbsolute()
    
final public  voidtestAnchors()
     A UURI should always be without a 'fragment' segment, which is unused and irrelevant for network fetches.
final public  voidtestBadBaseResolve()
    
final public  voidtestCurlies()
    
final public  voidtestDnsHost()
    
final public  voidtestDoubleEncoding()
     Test for doubly-encoded sequences.
final public  voidtestEscapeEncoding()
    
final public  voidtestEscaping()
    
public  voidtestEscapingNotNecessary()
    
final public  voidtestFtpUris()
    
final public  voidtestHostEncodedChars()
    
final public  voidtestHostWithDigit()
     Test for java.net.URI#getHost fails when leading digit.
final public  voidtestHostWithLessThan()
     Test for [ 962892 ] UURI accepting/creating unUsable URIs (bad hosts).
final public  voidtestHostWithPeriod()
    
final public  voidtestHostWithUnderscores()
     Test for java.net.URI chokes on hosts_with_underscores.
public  voidtestHttpSchemeColonSlash()
    
public  voidtestIdn()
    
public  voidtestNewLineInURL()
    
final public  voidtestNoScheme()
    
final public  voidtestPercentEscaping()
    
final public  voidtestPort()
     Test for Constraining java URI class.
final public  voidtestPort0080is80()
    
public  voidtestQueryEscaping()
    
final public  voidtestRFC2396Relative()
     Tests from rfc2396 with amendments to accomodate differences intentionally added to make our URI handling like IEs.
 g:h           =  g:h
 g             =  http://a/b/c/g
 ./g           =  http://a/b/c/g
 g/            =  http://a/b/c/g/
 /g            =  http://a/g
 //g           =  http://g
 ?y            =  http://a/b/c/?y
 g?y           =  http://a/b/c/g?y
 #s            =  (current document)#s
 g#s           =  http://a/b/c/g#s
 g?y#s         =  http://a/b/c/g?y#s
 ;x            =  http://a/b/c/;x
 g;x           =  http://a/b/c/g;x
 g;x?y#s       =  http://a/b/c/g;x?y#s
 .
final public  voidtestRelative()
    
final public  voidtestRelativeDblPathSlashes()
    
final public  voidtestRelativeEmpty()
     Test that an empty uuri does the right thing -- that we get back the base.
final public  voidtestRelativeURIWithTwoSlashes()
    
final public  voidtestRelativeWithScheme()
    
public  voidtestSameAsNutchURLFilterBasic()
     Check that our 'normalization' does same as Nutch's Below before-and-afters were taken from the nutch urlnormalizer-basic TestBasicURLNormalizer class (December 2006, Nutch 0.9-dev).
final public  voidtestSpaceDoubleEncoding()
     Test space plus encoding ([ 1010966 ] crawl.log has URIs with spaces in them).
final public  voidtestSpaceInHost()
    
public  voidtestStartsWithColon()
     Ensure that URI strings beginning with a colon are treated the same as browsers do (as relative, rather than as absolute with zero-length scheme).
public  voidtestStrayPercents()
     Ensure that stray '%' characters do not prevent UURI instances from being created, and are reasonably escaped when encountered.
public  voidtestTabsInURL()
    
final public  voidtestThreeSlashes()
     Test for syntax errors stop page parsing.
final public  voidtestTilde()
    
final public  voidtestTooLongAfterEscaping()
    
final public  voidtestTrailingEncodedSpace()
    
public  voidtestTrailingPercents()
     Ensure that stray trailing '%' characters do not prevent UURI instances from being created, and are reasonably escaped when encountered.
final public  voidtestTrimSpaceNBSP()
    
final public  voidtestTwoDots()
     Two dots for igor.
final public  voidtestUnderscoreMakesPortParseFail()
    
final public  voidtestUserinfo()
     Preserve userinfo capitalization.
final public  voidtestUserinfoPlusPort()
    
final public  voidtestWhitespaceEscaped()
    



Method Detail
noChangeExpected
protected UURI noChangeExpected(String original) throws URIException(Code)



test2kURI
final public void test2kURI() throws URIException(Code)
Test for [ 1012520 ] UURI.length() > 2k.
throws:
  URIException -
See Also:    [ 1012520 ] UURI.length() > 2k



testAbsolute
final public void testAbsolute() throws URIException(Code)



testAnchors
final public void testAnchors() throws URIException(Code)
A UURI should always be without a 'fragment' segment, which is unused and irrelevant for network fetches. See [ 970666 ] #anchor links not trimmed, and thus recrawled
throws:
  URIException -



testBadBaseResolve
final public void testBadBaseResolve() throws URIException(Code)



testCurlies
final public void testCurlies() throws URIException(Code)



testDnsHost
final public void testDnsHost() throws URIException(Code)



testDoubleEncoding
final public void testDoubleEncoding() throws URIException(Code)
Test for doubly-encoded sequences. See [ 966219 ] UURI doubly-encodes %XX sequences.
throws:
  URIException -



testEscapeEncoding
final public void testEscapeEncoding() throws URIException(Code)



testEscaping
final public void testEscaping() throws URIException(Code)



testEscapingNotNecessary
public void testEscapingNotNecessary() throws URIException(Code)



testFtpUris
final public void testFtpUris() throws URIException(Code)



testHostEncodedChars
final public void testHostEncodedChars() throws URIException(Code)
Test for NPE in java.net.URI.encode
See Also:    [ 874220 ] NPE in java.net.URI.encode
throws:
  URIException -



testHostWithDigit
final public void testHostWithDigit() throws URIException(Code)
Test for java.net.URI#getHost fails when leading digit.
See Also:    [ 910120 ] java.net.URI#getHost fails when leading digit.
throws:
  URIException -



testHostWithLessThan
final public void testHostWithLessThan()(Code)
Test for [ 962892 ] UURI accepting/creating unUsable URIs (bad hosts).
See Also:    [ 962892 ] UURI accepting/creating unUsable URIs (bad hosts)



testHostWithPeriod
final public void testHostWithPeriod() throws URIException(Code)
Test for doing separate DNS lookup for same host
See Also:    [ 788277 ] Doing separate DNS lookup for same host
throws:
  URIException -



testHostWithUnderscores
final public void testHostWithUnderscores() throws URIException(Code)
Test for java.net.URI chokes on hosts_with_underscores.
See Also:    [ 808270 ] java.net.URI chokes on hosts_with_underscores
throws:
  URIException -



testHttpSchemeColonSlash
public void testHttpSchemeColonSlash()(Code)



testIdn
public void testIdn() throws URIException(Code)



testNewLineInURL
public void testNewLineInURL() throws URIException(Code)



testNoScheme
final public void testNoScheme()(Code)



testPercentEscaping
final public void testPercentEscaping() throws URIException(Code)



testPort
final public void testPort()(Code)
Test for Constraining java URI class.
See Also:    [ 949548 ] Constraining java URI class



testPort0080is80
final public void testPort0080is80() throws URIException(Code)



testQueryEscaping
public void testQueryEscaping() throws URIException(Code)



testRFC2396Relative
final public void testRFC2396Relative() throws URIException(Code)
Tests from rfc2396 with amendments to accomodate differences intentionally added to make our URI handling like IEs.
 g:h           =  g:h
 g             =  http://a/b/c/g
 ./g           =  http://a/b/c/g
 g/            =  http://a/b/c/g/
 /g            =  http://a/g
 //g           =  http://g
 ?y            =  http://a/b/c/?y
 g?y           =  http://a/b/c/g?y
 #s            =  (current document)#s
 g#s           =  http://a/b/c/g#s
 g?y#s         =  http://a/b/c/g?y#s
 ;x            =  http://a/b/c/;x
 g;x           =  http://a/b/c/g;x
 g;x?y#s       =  http://a/b/c/g;x?y#s
 .             =  http://a/b/c/
 ./            =  http://a/b/c/
 ..            =  http://a/b/
 ../           =  http://a/b/
 ../g          =  http://a/b/g
 ../..         =  http://a/
 ../../        =  http://a/
 ../../g       =  http://a/g
 

throws:
  URIException -



testRelative
final public void testRelative() throws URIException(Code)



testRelativeDblPathSlashes
final public void testRelativeDblPathSlashes() throws URIException(Code)



testRelativeEmpty
final public void testRelativeEmpty() throws URIException(Code)
Test that an empty uuri does the right thing -- that we get back the base.
throws:
  URIException -



testRelativeURIWithTwoSlashes
final public void testRelativeURIWithTwoSlashes() throws URIException(Code)



testRelativeWithScheme
final public void testRelativeWithScheme() throws URIException(Code)



testSameAsNutchURLFilterBasic
public void testSameAsNutchURLFilterBasic() throws URIException(Code)
Check that our 'normalization' does same as Nutch's Below before-and-afters were taken from the nutch urlnormalizer-basic TestBasicURLNormalizer class (December 2006, Nutch 0.9-dev).
throws:
  URIException -



testSpaceDoubleEncoding
final public void testSpaceDoubleEncoding() throws URIException(Code)
Test space plus encoding ([ 1010966 ] crawl.log has URIs with spaces in them). See [ 1010966 ] crawl.log has URIs with spaces in them.
throws:
  URIException -



testSpaceInHost
final public void testSpaceInHost()(Code)
Test for java.net.URI parses %20 but getHost null See [ 927940 ] java.net.URI parses %20 but getHost null



testStartsWithColon
public void testStartsWithColon() throws URIException(Code)
Ensure that URI strings beginning with a colon are treated the same as browsers do (as relative, rather than as absolute with zero-length scheme).
throws:
  URIException -



testStrayPercents
public void testStrayPercents() throws URIException(Code)
Ensure that stray '%' characters do not prevent UURI instances from being created, and are reasonably escaped when encountered.
throws:
  URIException -



testTabsInURL
public void testTabsInURL() throws URIException(Code)



testThreeSlashes
final public void testThreeSlashes() throws URIException(Code)
Test for syntax errors stop page parsing.
See Also:    [ 788219 ] URI Syntax Errors stop page parsing
throws:
  URIException -



testTilde
final public void testTilde() throws URIException(Code)



testTooLongAfterEscaping
final public void testTooLongAfterEscaping()(Code)



testTrailingEncodedSpace
final public void testTrailingEncodedSpace() throws URIException(Code)



testTrailingPercents
public void testTrailingPercents() throws URIException(Code)
Ensure that stray trailing '%' characters do not prevent UURI instances from being created, and are reasonably escaped when encountered.
throws:
  URIException -



testTrimSpaceNBSP
final public void testTrimSpaceNBSP() throws URIException(Code)



testTwoDots
final public void testTwoDots()(Code)
Two dots for igor.



testUnderscoreMakesPortParseFail
final public void testUnderscoreMakesPortParseFail() throws URIException(Code)



testUserinfo
final public void testUserinfo() throws URIException(Code)
Preserve userinfo capitalization.
throws:
  URIException -



testUserinfoPlusPort
final public void testUserinfoPlusPort() throws URIException(Code)
Test user info + port
throws:
  URIException -



testWhitespaceEscaped
final public void testWhitespaceEscaped() throws URIException(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.