Java Doc for CodeSourceTest.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » security » tests » java » security » 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 » Apache Harmony Java SE » org package » org.apache.harmony.security.tests.java.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.harmony.security.tests.java.security.CodeSourceTest

CodeSourceTest
public class CodeSourceTest extends TestCase (Code)
Unit test for CodeSource.




Method Summary
public static  voidmain(String[] args)
     Entry point for standalone runs.
protected  voidsetUp()
    
public  voidtestCodeSourceURLCertificateArray()
     Tests CodeSource(URL, Certificate[]).
public  voidtestCodeSourceURLCodeSignerArray()
     Tests CodeSource(URL, CodeSigner[]).
public  voidtestEqualsObject_00()
    
public  voidtestEqualsObject_01()
    
public  voidtestEqualsObject_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  voidtestEqualsObject_04()
     Test for equals(Object)
Checks that both 'null' and not-null URLs are taken into account - properly.
public  voidtestGetCertificates_00()
     Tests CodeSource.getCertificates().
public  voidtestGetCertificates_01()
     Tests whether the getCertificates() returns certificates obtained from the signers.
public  voidtestGetCodeSigners_00()
     Tests CodeSource.getCodeSigners().
public  voidtestGetCoderSignersNull()
    
public  voidtestGetLocation()
    
public  voidtestHashCode()
     Tests hashCode().
javadoc says nothing, so test DRL-specific implementation.
public  voidtestImplies_00()
    
public  voidtestImplies_01()
    
public  voidtestImplies_02()
     If this object's location equals codesource's location, then return true.
public  voidtestImplies_03_tmp()
     This object's protocol (getLocation().getProtocol()) must be equal to codesource's protocol.
public  voidtestImplies_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  voidtestImplies_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  voidtestImplies_06()
     If this object's file (getLocation().getFile()) doesn't equal codesource's file, then the following checks are made: ...
public  voidtestImplies_07()
     ...
public  voidtestImplies_08()
     ...
public  voidtestImplies_09()
     ...
public  voidtestImplies_0A()
     If this object's reference (getLocation().getRef()) is not null, it must equal codesource's reference.
public  voidtestImplies_0B()
     If this certificates are not null, then all of this certificates should be presented in certificates of that codesource.
public  voidtestImplies_0C()
     Testing with special URLs like 'localhost', 'file://' scheme ...
public  voidtestImplies_0D()
     Testing with special URLs like 'localhost', 'file://' scheme ...
public  voidtestToString()
    



Method Detail
main
public static void main(String[] args) throws Exception(Code)
Entry point for standalone runs.
Parameters:
  args - command line arguments



setUp
protected void setUp() throws Exception(Code)



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()



w__ww_.__j__av_a_2_s_.___c___om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.