Code example for PKIXParameters

Methods: getTrustAnchorssetTrustAnchors

0
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        } 
 
        Set taSet1 = TestUtils.getTrustAnchorSet();
        PKIXParameters p = new PKIXParameters(taSet);
        p.setTrustAnchors(taSet1);
        assertFalse(p.getTrustAnchors().isEmpty());
    } 
 
    /** 
     * Test #2 for <code>setTrustAnchors(Set)</code> method<br> 
     * Assertion: <code>InvalidAlgorithmParameterException</code> - 
     * if the specified <code>Set</code> is empty 
     * (<code>trustAnchors.isEmpty() == true</code>) 
     * @throws InvalidAlgorithmParameterException 
     */ 
    public final void testSetTrustAnchors02() throws Exception { 
        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");