pk.edu.niit.clarens.test
Class CertUtilTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bypk.edu.niit.clarens.test.CertUtilTest
All Implemented Interfaces:
junit.framework.Test

public class CertUtilTest
extends junit.framework.TestCase

Tests of the static utility methods provided by the CertUtil class.

See Also:
CertUtil

Constructor Summary
CertUtilTest(java.lang.String s)
          Create a named test case.
 
Method Summary
 void testBareCertificateChain()
          Read a certificate from a file with no text preceding the -----BEGIN certificate header.
 void testBareCertificateRead()
          Read a certificate from a file without any text preceding the -----BEGIN certificate header.
 void testCertificate()
          Read a certificate from a file with text preceding the -----BEGIN certificate header.
 void testCertificateChain()
          Read a certificate chain from a file with text preceding the -----BEGIN certificate header.
 void testPkcs8Key()
          Read a PKCS#8 private key from a file.
 void testTraditionalKey()
          Read a traditional private key from a file.
 
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

CertUtilTest

public CertUtilTest(java.lang.String s)
Create a named test case.

Parameters:
s - The name of the test to construct.
Method Detail

testBareCertificateRead

public void testBareCertificateRead()
                             throws java.lang.Exception
Read a certificate from a file without any text preceding the -----BEGIN certificate header.

Throws:
java.lang.Exception - Any thrown exceptions will cause the test to fail.

testCertificate

public void testCertificate()
                     throws java.lang.Exception
Read a certificate from a file with text preceding the -----BEGIN certificate header.

Throws:
java.lang.Exception - Any thrown exceptions will cause the test to fail.

testBareCertificateChain

public void testBareCertificateChain()
                              throws java.lang.Exception
Read a certificate from a file with no text preceding the -----BEGIN certificate header.

Throws:
java.lang.Exception - Any thrown exceptions will cause the test to fail.

testCertificateChain

public void testCertificateChain()
                          throws java.lang.Exception
Read a certificate chain from a file with text preceding the -----BEGIN certificate header.

Throws:
java.lang.Exception - Any thrown exceptions will cause the test to fail.

testPkcs8Key

public void testPkcs8Key()
                  throws java.lang.Exception
Read a PKCS#8 private key from a file.

Throws:
java.lang.Exception - Any thrown exceptions will cause the test to fail.

testTraditionalKey

public void testTraditionalKey()
                        throws java.lang.Exception
Read a traditional private key from a file.

Throws:
java.lang.Exception - Any thrown exceptions will cause the test to fail.