Code example for PKIXParameters

Methods: getInitialPoliciessetInitialPolicies

0
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        } 
 
        Set s = new HashSet();
        s.add("1.2.3.4.5.6.7");
        PKIXParameters p = new PKIXParameters(taSet);
        p.setInitialPolicies(s);
        assertEquals(1, p.getInitialPolicies().size());
    } 
 
    /** 
     * Test #2 for <code>setInitialPolicies(Set)</code> method<br> 
     * Assertion: <code>Set</code> may be <code>null</code> 
     * @throws InvalidAlgorithmParameterException 
     */ 
    public final void testSetInitialPolicies02() throws Exception { 
        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        }