org.openoces.ooapi.cert
Class OrganizationalOcesCertificateTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.openoces.ooapi.cert.OrganizationalOcesCertificateTest
All Implemented Interfaces:
junit.framework.Test

public class OrganizationalOcesCertificateTest
extends junit.framework.TestCase

This class implements junit tests specific to OCES employee certificates

Author:
Carsten Raskgaard

Field Summary
protected  OrganizationalOcesCertificate c0
           
protected  OrganizationalOcesCertificate c1
           
protected  java.security.cert.X509Certificate organizationalCertificate
           
 
Constructor Summary
OrganizationalOcesCertificateTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testConstruction()
           
 void testExtractedSubjectDN()
           
 void testOcesIdExtraction()
           
 void testOrganizationalOcesIdExtraction()
           
 void testVerification()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, 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
 

Field Detail

organizationalCertificate

protected java.security.cert.X509Certificate organizationalCertificate

c0

protected OrganizationalOcesCertificate c0

c1

protected OrganizationalOcesCertificate c1
Constructor Detail

OrganizationalOcesCertificateTest

public OrganizationalOcesCertificateTest()
Method Detail

testConstruction

public void testConstruction()

testOcesIdExtraction

public void testOcesIdExtraction()
                          throws NonOcesCertificateException
Throws:
NonOcesCertificateException

testOrganizationalOcesIdExtraction

public void testOrganizationalOcesIdExtraction()
                                        throws NonOcesCertificateException
Throws:
NonOcesCertificateException

testVerification

public void testVerification()
                      throws SignatureVerificationException,
                             CertificateHasExpiredException,
                             InternalException,
                             CertificateIsNotYetValidException,
                             CertificateRevokedException,
                             CRLExpiredException,
                             CRLNotYetValidException
Throws:
SignatureVerificationException
CertificateHasExpiredException
InternalException
CertificateIsNotYetValidException
CertificateRevokedException
CRLExpiredException
CRLNotYetValidException

testExtractedSubjectDN

public void testExtractedSubjectDN()

setUp

protected void setUp()
              throws java.security.cert.CertificateException,
                     java.io.IOException,
                     java.security.cert.CRLException,
                     CRLExpiredException,
                     CRLNotYetValidException
Throws:
java.security.cert.CertificateException
java.io.IOException
java.security.cert.CRLException
CRLExpiredException
CRLNotYetValidException

tearDown

protected void tearDown()