public class HandlerTest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected net.sf.fsp.fsplib.Handler |
h |
protected URL |
u1 |
protected URL |
u2 |
| Constructor and Description |
|---|
HandlerTest() |
| Modifier and Type | Method and Description |
|---|---|
static void |
initialize()
Init handler for FSP protocol.
|
void |
setUp()
Create instance of handler for testing
|
void |
testEqualsDiffentAnchor()
Test method for equals
same file, different anchor string
|
void |
testEqualsDiffentQuery()
Test method for equals
same file, different query string
|
void |
testEqualsDiffentQueryAndAnchor()
Test method for equals
same file, different anchor and query string
|
void |
testEqualsDifferentHost()
Test method for equals
same URL with different host
|
void |
testEqualsDifferentPath()
Test method for equals
same URL with different path
|
void |
testEqualsDifferentURL()
Test method for equals
different URL
|
void |
testEqualsSameObject()
Test method for equals
same Object
|
void |
testEqualsSameURL()
Test method for equals
same URL
|
void |
testEqualsSameURLwithDifferentPort()
Test method for equals
same URL with different port
|
void |
testEqualsSameURLwithPort()
Test method for equals
same URL with port
|
void |
testGetDefaultPort()
Test method for
Handler.getDefaultPort(). |
void |
testGetHostAddress()
Test method for getHostAddress.
|
void |
testHashCodeForSameURL1()
Test if URL hashing function return same results for same URLs
Called on two same but not identical URLs.
|
void |
testHashCodeForSameURL2()
Test if URL hashing function return same results for same URLs
Called on two same but not identical URLs.
|
void |
testHashCodeForSameURL3()
Test if URL hashing function return same results for same URLs
Called on two same but not identical URLs.
|
void |
testHashCodeForSameURL4()
Test if URL hashing function return same results for same URLs
Called on two same but not identical URLs.
|
void |
testHashCodeStability1()
Test if URL hashing function is stable.
|
void |
testHashCodeStability2()
Test if URL hashing function is stable.
|
void |
testOpenConnectionURL()
Test method for
Handler.openConnection(java.net.URL). |
void |
testOpenConnectionURLProxy()
Test method for
URLStreamHandler.openConnection(java.net.URL, java.net.Proxy). |
void |
testToExternalForm()
Test method for
URLStreamHandler.toExternalForm(java.net.URL). |
void |
testURLStreamHandlerConstructor()
Check if constructor creates new object
Test method for
URLStreamHandler.URLStreamHandler(). |
void |
testURLStreamHandlerConstructorIsPublic()
Check if constructor is public
Test method for
URLStreamHandler.URLStreamHandler(). |
public static void initialize()
public void setUp()
public void testURLStreamHandlerConstructor()
URLStreamHandler.URLStreamHandler().public void testURLStreamHandlerConstructorIsPublic()
URLStreamHandler.URLStreamHandler().public void testEqualsSameObject()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsSameURL()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsDifferentURL()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsSameURLwithPort()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsSameURLwithDifferentPort()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsDifferentHost()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsDifferentPath()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsDiffentQuery()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsDiffentAnchor()
throws MalformedURLException
MalformedURLException - not expectedpublic void testEqualsDiffentQueryAndAnchor()
throws MalformedURLException
MalformedURLException - not expectedpublic void testGetDefaultPort()
Handler.getDefaultPort().public void testGetHostAddress()
throws MalformedURLException,
UnknownHostException
MalformedURLException - not expectedUnknownHostException - should not happenpublic void testHashCodeStability1()
throws MalformedURLException
URLStreamHandler.hashCode(java.net.URL).MalformedURLException - not expectedpublic void testHashCodeStability2()
throws MalformedURLException
URLStreamHandler.hashCode(java.net.URL).MalformedURLException - not expectedpublic void testHashCodeForSameURL1()
throws MalformedURLException
URLStreamHandler.hashCode(java.net.URL).MalformedURLException - not expectedpublic void testHashCodeForSameURL2()
throws MalformedURLException
URLStreamHandler.hashCode(java.net.URL).MalformedURLException - not expectedpublic void testHashCodeForSameURL3()
throws MalformedURLException
URLStreamHandler.hashCode(java.net.URL).MalformedURLException - not expectedpublic void testHashCodeForSameURL4()
throws MalformedURLException
URLStreamHandler.hashCode(java.net.URL).MalformedURLException - not expectedpublic void testOpenConnectionURL()
throws MalformedURLException
Handler.openConnection(java.net.URL).MalformedURLException - not expectedpublic void testOpenConnectionURLProxy()
URLStreamHandler.openConnection(java.net.URL, java.net.Proxy).public void testToExternalForm()
throws MalformedURLException
URLStreamHandler.toExternalForm(java.net.URL).
We are removing standard port :21 from URL String representations for better
readability.MalformedURLException - not expectedCopyright © 2019 FSP Project. All rights reserved.