01: package org.bouncycastle.openpgp.test;
02:
03: import junit.framework.Test;
04: import junit.framework.TestCase;
05: import junit.framework.TestSuite;
06: import org.bouncycastle.jce.provider.BouncyCastleProvider;
07: import org.bouncycastle.util.test.SimpleTestResult;
08:
09: import java.security.Security;
10:
11: public class AllTests extends TestCase {
12: public void testPGP() {
13: Security.addProvider(new BouncyCastleProvider());
14:
15: org.bouncycastle.util.test.Test[] tests = RegressionTest.tests;
16:
17: for (int i = 0; i != tests.length; i++) {
18: SimpleTestResult result = (SimpleTestResult) tests[i]
19: .perform();
20:
21: if (!result.isSuccessful()) {
22: fail(result.toString());
23: }
24: }
25: }
26:
27: public static void main(String[] args) {
28: junit.textui.TestRunner.run(suite());
29: }
30:
31: public static Test suite() {
32: TestSuite suite = new TestSuite("OpenPGP Tests");
33:
34: suite.addTestSuite(AllTests.class);
35: suite.addTestSuite(DSA2Test.class);
36:
37: return suite;
38: }
39: }
|