pk.edu.niit.clarens.test
Class RSAPrivateKeyBlockTest

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

public class RSAPrivateKeyBlockTest
extends junit.framework.TestCase

Tests of the class that manage openssl traditional private key pem blocks.

See Also:
RSAPrivateKeyBlock

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

RSAPrivateKeyBlockTest

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

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

testRSAKeyString

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

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

testRSAPrivateKeyMismatch

public void testRSAPrivateKeyMismatch()
                               throws java.lang.Exception
Attempt to read a PKCS8 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.