FileDocCategorySizeDatePackage
CertStoreSpiTest.javaAPI DocAndroid 1.5 API4107Wed May 06 22:41:06 BST 2009tests.security.cert

CertStoreSpiTest

public class CertStoreSpiTest extends TestCase
Tests for CertStoreSpi class constructors and methods.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        junit.textui.TestRunner.run(suite());
    
public static junit.framework.Testsuite()

        return new TestSuite(CertStoreSpiTest.class);
    
public voidtestCertStoreSpi01()
Test for CertStoreSpi constructor Assertion: constructs CertStoreSpi

        CertStoreSpi certStoreSpi = null;
        CertSelector certSelector = new tmpCertSelector();//new
                                                          // X509CertSelector();
        CRLSelector crlSelector = new tmpCRLSelector();//new X509CRLSelector();
        try {
            certStoreSpi = new MyCertStoreSpi(null);
            fail("InvalidAlgorithmParameterException must be thrown");
        } catch (InvalidAlgorithmParameterException e) {
        }
        certStoreSpi = new MyCertStoreSpi(new MyCertStoreParameters());
        assertNull("Not null collection", certStoreSpi
                .engineGetCertificates(certSelector));
        assertNull("Not null collection", certStoreSpi
                .engineGetCRLs(crlSelector));