jeudi 30 juin 2016

Bouncy Castle Issue when Unit Testing Android

We are using BouncyCastle library in our android application. It is injected in Application singleton in static form:

static {
        java.security.Security.insertProviderAt(new org.spongycastle.jce.provider.BouncyCastleProvider(), 1);
}

But when I run local unit tests, the system throws me NoSuchProvider Exceptions at every place it was using Bouncy Castle. So, the question is how to inject Bouncy Castle Providers into android local unit tests?

Aucun commentaire:

Enregistrer un commentaire