pk.edu.niit.clarens.test
Class PKCS8UnencryptedPrivateKeyBlockTest

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

public class PKCS8UnencryptedPrivateKeyBlockTest
extends junit.framework.TestCase

Tests of the class that manage PKCS8 format private key pem blocks.

See Also:
PKCS8UnencryptedPrivateKeyBlock

Constructor Summary
PKCS8UnencryptedPrivateKeyBlockTest(java.lang.String s)
          Create a named test case.
 
Method Summary
 void testPKCS8KeyString()
          Read a private key from string data.
 void testPKCS8PrivateKeyMismatch()
          Attempt to read a traditional private key from string data.
 
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

PKCS8UnencryptedPrivateKeyBlockTest

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

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

testPKCS8KeyString

public void testPKCS8KeyString()
                        throws java.lang.Exception
Read a private key from string data.

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

testPKCS8PrivateKeyMismatch

public void testPKCS8PrivateKeyMismatch()
                                 throws java.lang.Exception
Attempt to read a traditional private key from string data. This test case checks the exception thrown by this invalid operation.

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