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