Code example for ECParameterSpec

Methods: getCofactor, getCurve, getGenerator, getOrder

0
     * test covers following usecases:  
     * case 1: creating object with valid parameters 
     * case 2: NullPointerException - if curve is null  
     * case 3: NullPointerException - if g is null 
     * case 4: NullPointerException - if n is null 
     * case 5: IllegalArgumentException - if n is not positive 
     * case 6: IllegalArgumentException - if h is not positive 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "ECParameterSpec", 
        args = {java.security.spec.EllipticCurve.class, java.security.spec.ECPoint.class, java.math.BigInteger.class, int.class}
    ) 
    public void test_constructorLjava_security_spec_EllipticCurveLjava_security_spec_ECPointLjava_math_BigIntegerI() { 
         
        // case 1: creating object with valid parameters 
        assertEquals("wrong cofactor was returned", 1, ecps.getCofactor());
        assertEquals("wrong elliptic curve", curve, ecps.getCurve());
        assertEquals("wrong generator was returned", ecpoint, ecps
                .getGenerator());