/** * Test for <code>AlgorithmParameters</code> constructor * Assertion: returns AlgorithmParameters object */ public void testAlgorithmParametersConst() throws Exception { AlgorithmParametersSpi spi = new MyAlgorithmParameters(); AlgorithmParameters ap = new myAlgP(spi, p, "ABC"); checkUnititialized(ap); ap.init(new byte[6], "aaa"); checkAP(ap, p); //NULL parameters try { ap = new myAlgP(null, null, null); } catch (Exception e){ fail("Exception should be not thrown"); } }
/** * Test for <code>AlgorithmParameters</code> constructor * Assertion: returns AlgorithmParameters object */ @TestTargetNew( level = TestLevel.COMPLETE, notes = "There are no tests with invalid arguments. This is " + "ok since the effects of calling the constructor with " + "invalid parameters can not be observed.", method = "AlgorithmParameters", args = {java.security.AlgorithmParametersSpi.class, java.security.Provider.class, java.lang.String.class} ) public void testAlgorithmParametersConst() throws Exception { AlgorithmParametersSpi spi = new MyAlgorithmParameters(); AlgorithmParameters ap = new myAlgP(spi, p, "ABC"); checkUnititialized(ap); ap.init(new byte[6], "aaa"); checkAP(ap, p); //NULL parameters try { ap = new myAlgP(null, null, null); } catch (Exception e){ fail("Exception should be not thrown"); } }
/** * Test for <code>AlgorithmParametersSpi</code> constructor * Assertion: constructs AlgorithmParametersSpi */ public void testAlgorithmParametersSpi() { byte[] bt = new byte[10]; MyAlgorithmParametersSpi algParSpi = new MyAlgorithmParametersSpi(); assertTrue(algParSpi instanceof AlgorithmParametersSpi); assertNotNull(algParSpi); algParSpi.engineInit(new MyAlgorithmParameterSpec()); algParSpi.engineInit(bt); algParSpi.engineInit(bt, "Format"); algParSpi.engineToString(); algParSpi.engineGetEncoded(); algParSpi.engineGetEncoded("Format"); algParSpi.engineGetParameterSpec(java.lang.Class.class); }
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm) { super(paramSpi, provider, algorithm); }
public myAlgP(AlgorithmParametersSpi spi, Provider prov, String alg) { super(spi, prov, alg); }
/** * Test for <code>AlgorithmParametersSpi</code> constructor * Assertion: constructs AlgorithmParametersSpi */ @TestTargets({ @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "AlgorithmParametersSpi", args = {} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineGetEncoded", args = {} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineGetEncoded", args = {java.lang.String.class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineGetParameterSpec", args = {java.lang.Class.class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineInit", args = {java.security.spec.AlgorithmParameterSpec.class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineInit", args = {byte[].class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineInit", args = {byte[].class, java.lang.String.class} ), @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "engineToString", args = {} ) }) public void testAlgorithmParametersSpi() { byte[] bt = new byte[10]; MyAlgorithmParametersSpi algParSpi = new MyAlgorithmParametersSpi(); assertTrue(algParSpi instanceof AlgorithmParametersSpi); assertNotNull(algParSpi); algParSpi.engineInit(new MyAlgorithmParameterSpec()); algParSpi.engineInit(bt); algParSpi.engineInit(bt, "Format"); algParSpi.engineToString(); algParSpi.engineGetEncoded(); algParSpi.engineGetEncoded("Format"); algParSpi.engineGetParameterSpec(java.lang.Class.class); }
protected Mock_AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm) { super(paramSpi, provider, algorithm); }