Code example for ExemptionMechanism

Methods: init

0
        args = {} 
    ) 
    public void test_getName() throws Exception { 
        Provider mProv = (new SpiEngUtils()).new MyProvider("MyExMechProvider",
                "Provider for ExemptionMechanism testing", 
                srvExemptionMechanism.concat(".").concat(defaultAlg),
                ExemptionMechanismProviderClass);
 
        ExemptionMechanism em = new ExemptionMechanism(
                new MyExemptionMechanismSpi(), mProv, defaultAlg) {
        }; 
 
        Key key = new MyExemptionMechanismSpi().new tmpKey("Proba", new byte[0]);
 
        assertEquals(defaultAlg, em.getName());
    } 
 
    @TestTargets({ 
        @TestTargetNew( 
            level = TestLevel.COMPLETE, 
            notes = "", 
            method = "getOutputSize", 
            args = {int.class} 
        ), 
        @TestTargetNew( 
            level = TestLevel.COMPLETE, 
            notes = "", 
            clazz = ExemptionMechanismSpi.class,
            method = "engineGetOutputSize", 
            args = {int.class} 
        ) 
    }) 
    public void test_getOutputSizeI() throws Exception { 
        Provider mProv = (new SpiEngUtils()).new MyProvider("MyExMechProvider",
                "Provider for ExemptionMechanism testing", 
                srvExemptionMechanism.concat(".").concat(defaultAlg),
                ExemptionMechanismProviderClass);