/** * Test for <code>engineGenerateCertPath(InputStream)</code> method. * Assertion: Generates a <code>CertPath</code> object and initializes it * with the data read from the <code>InputStream</code> */ @TestTargetNew( level = TestLevel.PARTIAL_COMPLETE, notes = "Verifies that engineGenerateCertPath method returns null.", method = "engineGenerateCertPath", args = {java.io.InputStream.class} ) public void testEngineGenerateCertPathLjava_io_InputStream01() { CertificateFactorySpi certFactorySpi = new MyCertificateFactorySpi(); MyCertificateFactorySpi.putMode(true); ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); DataInputStream dis = new DataInputStream(bais); try { assertNull(certFactorySpi.engineGenerateCertPath(dis)); } catch (CertificateException e) { fail("Unexpected CertificateException " + e.getMessage()); } }
@TestTargets({ @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineGenerateCRL", args = {java.io.InputStream.class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineGenerateCRLs", args = {java.io.InputStream.class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineGenerateCertificate", args = {java.io.InputStream.class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineGenerateCertificates", args = {java.io.InputStream.class} ) }) public void testAbstractMethods() { CertificateFactorySpi certFactorySpi = new extCertificateFactorySpi(); ByteArrayInputStream bais = new ByteArrayInputStream(new byte[3]); DataInputStream dis = new DataInputStream(bais); try { certFactorySpi.engineGenerateCRL(dis); certFactorySpi.engineGenerateCRLs(dis); certFactorySpi.engineGenerateCertificate(dis); certFactorySpi.engineGenerateCertificates(dis); } catch (Exception e) { fail("Unexpected exception " + e.getMessage()); } }
public myCertificateFactory(CertificateFactorySpi spi, Provider prov, String type) { super(spi, prov, type); }