org.openoces.ooapi.cert
Class EmployeeOcesCertificateTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.openoces.ooapi.cert.EmployeeOcesCertificateTest
All Implemented Interfaces:
junit.framework.Test

public class EmployeeOcesCertificateTest
extends junit.framework.TestCase

This class implements junit tests specific to OCES employee certificates

Author:
Carsten Raskgaard

Field Summary
protected  EmployeeOcesCertificate c
           
protected  java.security.cert.X509Certificate employeeCertificate
           
 
Constructor Summary
EmployeeOcesCertificateTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testConstruction()
           
 void testEmployeeOcesIdExtraction()
           
 void testExtractedSubjectDN()
           
 void testOcesIdExtraction()
           
 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

employeeCertificate

protected java.security.cert.X509Certificate employeeCertificate

c

protected EmployeeOcesCertificate c
Constructor Detail

EmployeeOcesCertificateTest

public EmployeeOcesCertificateTest()
Method Detail

testConstruction

public void testConstruction()

testOcesIdExtraction

public void testOcesIdExtraction()
                          throws NonOcesCertificateException
Throws:
NonOcesCertificateException

testEmployeeOcesIdExtraction

public void testEmployeeOcesIdExtraction()
                                  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
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.security.cert.CertificateException
java.io.IOException
java.security.cert.CRLException
CRLExpiredException
CRLNotYetValidException

tearDown

protected void tearDown()
Overrides:
tearDown in class junit.framework.TestCase