@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); ExemptionMechanism em = new ExemptionMechanism( new MyExemptionMechanismSpi(), mProv, defaultAlg) { }; Key key = new MyExemptionMechanismSpi().new tmpKey("Proba", new byte[0]); try { em.getOutputSize(10); fail("IllegalStateException expected"); } catch (IllegalStateException e) { //failed } em.init(key); assertEquals(10, em.getOutputSize(10)); }
protected Mock_ExemptionMechanism(ExemptionMechanismSpi exmechSpi, Provider provider, String mechanism) { super(exmechSpi, provider, mechanism); }
public myEM(ExemptionMechanismSpi spi, Provider prov, String mechanism) { super(spi, prov, mechanism); }