| org.apache.harmony.security.tests.java.security.CodeSourceTest
CodeSourceTest | public class CodeSourceTest extends TestCase (Code) | | Unit test for CodeSource.
|
Method Summary | |
public static void | main(String[] args) Entry point for standalone runs. | protected void | setUp() | public void | testCodeSourceURLCertificateArray() Tests CodeSource(URL, Certificate[]). | public void | testCodeSourceURLCodeSignerArray() Tests CodeSource(URL, CodeSigner[]). | public void | testEqualsObject_00() | public void | testEqualsObject_01() | public void | testEqualsObject_02() Test for equals(Object)
The signer certificate chain must contain the same set of certificates, but
the order of the certificates is not taken into account. | public void | testEqualsObject_04() Test for equals(Object)
Checks that both 'null' and not-null URLs are taken into account - properly. | public void | testGetCertificates_00() Tests CodeSource.getCertificates(). | public void | testGetCertificates_01() Tests whether the getCertificates() returns certificates obtained from
the signers. | public void | testGetCodeSigners_00() Tests CodeSource.getCodeSigners(). | public void | testGetCoderSignersNull() | public void | testGetLocation() | public void | testHashCode() Tests hashCode().
javadoc says nothing, so test DRL-specific implementation. | public void | testImplies_00() | public void | testImplies_01() | public void | testImplies_02() If this object's location equals codesource's location, then return true. | public void | testImplies_03_tmp() This object's protocol (getLocation().getProtocol()) must be equal to
codesource's protocol. | public void | testImplies_04() If this object's host (getLocation().getHost()) is not null, then the
SocketPermission constructed with this object's host must imply the
SocketPermission constructed with codesource's host. | public void | testImplies_05() If this object's port (getLocation().getPort()) is not equal to -1 (that
is, if a port is specified), it must equal codesource's port. | public void | testImplies_06() If this object's file (getLocation().getFile()) doesn't equal
codesource's file, then the following checks are made: ... | public void | testImplies_07() ... | public void | testImplies_08() ... | public void | testImplies_09() ... | public void | testImplies_0A() If this object's reference (getLocation().getRef()) is not null, it must
equal codesource's reference. | public void | testImplies_0B() If this certificates are not null, then all of this certificates should
be presented in certificates of that codesource. | public void | testImplies_0C() Testing with special URLs like 'localhost', 'file://' scheme ... | public void | testImplies_0D() Testing with special URLs like 'localhost', 'file://' scheme ... | public void | testToString() |
main | public static void main(String[] args) throws Exception(Code) | | Entry point for standalone runs.
Parameters: args - command line arguments |
testCodeSourceURLCertificateArray | public void testCodeSourceURLCertificateArray()(Code) | | Tests CodeSource(URL, Certificate[]).
|
testCodeSourceURLCodeSignerArray | public void testCodeSourceURLCodeSignerArray()(Code) | | Tests CodeSource(URL, CodeSigner[]).
|
testEqualsObject_00 | public void testEqualsObject_00()(Code) | | equals(Object) must return false for null
|
testEqualsObject_01 | public void testEqualsObject_01()(Code) | | equals(Object) must return true for the same object
|
testEqualsObject_02 | public void testEqualsObject_02()(Code) | | Test for equals(Object)
The signer certificate chain must contain the same set of certificates, but
the order of the certificates is not taken into account.
|
testEqualsObject_04 | public void testEqualsObject_04()(Code) | | Test for equals(Object)
Checks that both 'null' and not-null URLs are taken into account - properly.
|
testGetCertificates_00 | public void testGetCertificates_00()(Code) | | Tests CodeSource.getCertificates().
|
testGetCertificates_01 | public void testGetCertificates_01()(Code) | | Tests whether the getCertificates() returns certificates obtained from
the signers.
|
testGetCodeSigners_00 | public void testGetCodeSigners_00()(Code) | | Tests CodeSource.getCodeSigners().
|
testGetCoderSignersNull | public void testGetCoderSignersNull() throws Exception(Code) | | |
testGetLocation | public void testGetLocation()(Code) | | Tests CodeSource.getLocation()
|
testHashCode | public void testHashCode()(Code) | | Tests hashCode().
javadoc says nothing, so test DRL-specific implementation.
|
testImplies_00 | public void testImplies_00()(Code) | | must not imply null CodeSource
|
testImplies_01 | public void testImplies_01() throws Exception(Code) | | CodeSource with location=null && Certificate[] == null implies any other
CodeSource
|
testImplies_02 | public void testImplies_02() throws Exception(Code) | | If this object's location equals codesource's location, then return true.
|
testImplies_03_tmp | public void testImplies_03_tmp() throws Exception(Code) | | This object's protocol (getLocation().getProtocol()) must be equal to
codesource's protocol.
|
testImplies_04 | public void testImplies_04() throws Exception(Code) | | If this object's host (getLocation().getHost()) is not null, then the
SocketPermission constructed with this object's host must imply the
SocketPermission constructed with codesource's host.
|
testImplies_05 | public void testImplies_05() throws Exception(Code) | | If this object's port (getLocation().getPort()) is not equal to -1 (that
is, if a port is specified), it must equal codesource's port.
|
testImplies_06 | public void testImplies_06() throws Exception(Code) | | If this object's file (getLocation().getFile()) doesn't equal
codesource's file, then the following checks are made: ...
|
testImplies_07 | public void testImplies_07() throws Exception(Code) | | ... If this object's file ends with "/-", then codesource's file must
start with this object's file (exclusive the trailing "-").
|
testImplies_08 | public void testImplies_08() throws Exception(Code) | | ... If this object's file ends with a "/*", then codesource's file must
start with this object's file and must not have any further "/"
separators.
|
testImplies_09 | public void testImplies_09() throws Exception(Code) | | ... If this object's file doesn't end with a "/", then codesource's file
must match this object's file with a '/' appended.
|
testImplies_0A | public void testImplies_0A() throws Exception(Code) | | If this object's reference (getLocation().getRef()) is not null, it must
equal codesource's reference.
|
testImplies_0B | public void testImplies_0B()(Code) | | If this certificates are not null, then all of this certificates should
be presented in certificates of that codesource.
|
testImplies_0C | public void testImplies_0C() throws Exception(Code) | | Testing with special URLs like 'localhost', 'file://' scheme ...
These special URLs have a special processing in implies(),
so they need to be covered and performance need to be checked
|
testImplies_0D | public void testImplies_0D() throws Exception(Code) | | Testing with special URLs like 'localhost', 'file://' scheme ...
These special URLs have a special processing in implies(),
so they need to be covered and performance need to be checked
|
testToString | public void testToString()(Code) | | Tests CodeSource.toString()
|
|
|