Code example for ECPublicKeySpec

Methods: getParams, getW

0
 
    /** 
     * test for constructor ECPublicKeySpec(ECPoint, ECParameterSpec) 
     * test covers following usecases:  
     * case 1: creating object with valid parameters 
     * case 2: catch NullPointerException - if w is null. 
     * case 3: catch NullPointerException - if params is null. 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "ECPublicKeySpec", 
        args = {java.security.spec.ECPoint.class, java.security.spec.ECParameterSpec.class}
    ) 
    public final void test_constructorLjava_security_spec_ECPointLjava_security_spec_ECParameterSpec() { 
 
        // case 1: creating object with valid parameters 
        assertEquals("wrong params value", params, ecpks.getParams());
        assertEquals("wrong w value", w, ecpks.getW());
 
        // case 2: catch NullPointerException - if w is null.