FileDocCategorySizeDatePackage
SMIMETestSetup.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)1744Wed Oct 01 10:56:10 BST 2008org.bouncycastle.mail.smime.test

SMIMETestSetup

public class SMIMETestSetup extends TestSetup

Fields Summary
private CommandMap
originalMap
Constructors Summary
public SMIMETestSetup(Test test)


      
    
        super(test);
    
Methods Summary
protected voidsetUp()

        Security
                .addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

        MailcapCommandMap _mailcap = (MailcapCommandMap)CommandMap
                .getDefaultCommandMap();

        _mailcap
                .addMailcap("application/pkcs7-signature;; x-java-content-handler=org.bouncycastle.mail.smime.handlers.pkcs7_signature");
        _mailcap
                .addMailcap("application/pkcs7-mime;; x-java-content-handler=org.bouncycastle.mail.smime.handlers.pkcs7_mime");
        _mailcap
                .addMailcap("application/x-pkcs7-signature;; x-java-content-handler=org.bouncycastle.mail.smime.handlers.x_pkcs7_signature");
        _mailcap
                .addMailcap("application/x-pkcs7-mime;; x-java-content-handler=org.bouncycastle.mail.smime.handlers.x_pkcs7_mime");
        _mailcap
                .addMailcap("multipart/signed;; x-java-content-handler=org.bouncycastle.mail.smime.handlers.multipart_signed");

        originalMap = CommandMap.getDefaultCommandMap();
        CommandMap.setDefaultCommandMap(_mailcap);
    
protected voidtearDown()

        CommandMap.setDefaultCommandMap(originalMap);
        originalMap = null;
        Security.removeProvider("BC");