Search in sources :

Example 1 with MyCipher

use of org.apache.harmony.crypto.tests.support.MyCipher in project robovm by robovm.

the class CipherTest method test_Ctor.

/**
     * javax.crypto.Cipher#Cipher(CipherSpi cipherSpi, Provider provider,
     *        String transformation)
     */
public void test_Ctor() throws Exception {
    // Regression for Harmony-1184
    try {
        new testCipher(null, null, "s");
        fail();
    } catch (NullPointerException expected) {
    }
    try {
        new testCipher(new MyCipher(), null, "s");
        fail("NullPointerException expected for 'null' provider");
    } catch (NullPointerException expected) {
    }
    try {
        new testCipher(null, new Provider("qwerty", 1.0, "qwerty") {
        }, "s");
        fail("NullPointerException expected for 'null' cipherSpi");
    } catch (NullPointerException expected) {
    }
}
Also used : MyCipher(org.apache.harmony.crypto.tests.support.MyCipher) Provider(java.security.Provider)

Aggregations

Provider (java.security.Provider)1 MyCipher (org.apache.harmony.crypto.tests.support.MyCipher)1