01: package org.bouncycastle.openssl.test;
02:
03: import java.security.Security;
04:
05: import org.bouncycastle.jce.provider.BouncyCastleProvider;
06: import org.bouncycastle.util.test.SimpleTestResult;
07:
08: import junit.framework.*;
09:
10: public class AllTests extends TestCase {
11: public void testOpenSSL() {
12: Security.addProvider(new BouncyCastleProvider());
13:
14: org.bouncycastle.util.test.Test[] tests = new org.bouncycastle.util.test.Test[] {
15: new ReaderTest(), new WriterTest() };
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("OpenSSL Tests");
33:
34: suite.addTestSuite(AllTests.class);
35:
36: return suite;
37: }
38: }
|