diff options
Diffstat (limited to 'bcpkix/src/main/java/org/bouncycastle/cert/test/AllTests.java')
-rw-r--r-- | bcpkix/src/main/java/org/bouncycastle/cert/test/AllTests.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/bcpkix/src/main/java/org/bouncycastle/cert/test/AllTests.java b/bcpkix/src/main/java/org/bouncycastle/cert/test/AllTests.java index a5806862..6b85e8e7 100644 --- a/bcpkix/src/main/java/org/bouncycastle/cert/test/AllTests.java +++ b/bcpkix/src/main/java/org/bouncycastle/cert/test/AllTests.java @@ -2,6 +2,7 @@ package org.bouncycastle.cert.test; import java.security.Security; +import junit.extensions.TestSetup; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; @@ -52,6 +53,26 @@ public class AllTests suite.addTestSuite(BcPKCS10Test.class); suite.addTest(ConverterTest.suite()); - return suite; + return new BCTestSetup(suite); } + + static class BCTestSetup + extends TestSetup + { + public BCTestSetup(Test test) + { + super(test); + } + + protected void setUp() + { + Security.addProvider(new BouncyCastleProvider()); + } + + protected void tearDown() + { + Security.removeProvider("BC"); + } + } + }
\ No newline at end of file |